The computer has four slots containing balls that are Red, Yellow, Green, or Blue. eg RGYB or RRGB.. you as a user trying to guess it. You may for ex guess this as RRGY, if you guess a color right at same position, it is a hit, however, if you guess the colour there which is there in original solution(other than hits) but at some other position is a pseudo hit. eg solution RGGB and guess is YRGB then 2 hits and 1 pHit. For each guess you are told the number of hits and pHits. Given guess and solution, WAP to find the number of hits and pseudo hits.
This is simple, trying to using bit operations, somewhat writing wrong stuff. Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.