Using the above algorithm matches one pair of Ghostbuster and Ghost. On each side of the line formed by the pairing, the number of Ghostbusters and Ghosts are the same, so use the algorithm recursively on each side of the line to find pairings. The worst case is when, after each iteration, one side of the line contains no Ghostbusters or Ghosts. Then, we need n/2 total iterations to find pairings, giving us an P()- time algorithm.
Using the above algorithm matches one pair of Ghostbuster and Ghost. On each side of the line formed by the pairing, the number of Ghostbusters and Ghosts are the same, so use the algorithm recursively on each side of the line to find pairings. The worst case is when, after each iteration, one side of the line contains no Ghostbusters or Ghosts. Then, we need n/2 total iterations to find pairings, giving us an P()- time algorithm.
Given that a certain ski shop sells pairs of gloves in 12 different colors. One pair of each color is dropped in a bag and a store clerk reaches in to draw two individual gloves simultaneously and at random
In the bag now there are 12 pairs of different colours
Total number of ways of drawing 2 gloves from 24 gloves = 24C2 =276
Given that a certain ski shop sells pairs of gloves in 12 different colors. One pair of each color is dropped in a bag and a store clerk reaches in to draw two individual gloves simultaneously and at random
In the bag now there are 12 pairs of different colours
Total number of ways of drawing 2 gloves from 24 gloves = 24C2 =276