Archives

Algorithm for counting number of decks in a given pack of cards

this.decksOfCards([“2S”, “2C”, “2D”, “2H”, “3S”, “3C”, “3D”, “3H”, “4S”, “4C”, “4D”, “4H”, “5S”, “5C”, “5D”, “5H”, “6S”, “6C”, “6D”, “6H”, “7S”, “7C”, “7D”, “7H”, “8S”, “8C”, “8D”, “8H”, “9S”, “9C”, “9D”, “9H”, “TS”, “TC”, “TD”, “TH”, “JS”, “JC”, “JD”, “JH”, “QS”, “QC”, “QD”, “QH”, “KS”, “KC”, “KD”, “KH”, “AS”, “AC”, “AD”, “AH”, “2S”, “2C”, “2D”, […]

single lane highway

The problem statement isn’t clear. In the given example, 11 groups are cited but the count is only 10. Also, explain in detail what do you mean by groups and how are they formed for this problem statement to be able for us to solve this problem for you.

How to find the area of gray portion in the image ?

To find the area of gray portion, we  use the below equation Area of gray portion = Area of the semicircle on the Left hand side – Area of semicircle with diameter 2.6 cm + Area of semicircle with diameter 1.8 cm => 0.5 * π[0.5*(2.6+1.8)]^2 – 0.5*π(1.3)^2 + 0.5*π(0.9)^2 => 6.22035345411 sq cms Hope that […]