algos
BAN USER
Comments (5)
Reputation 2130
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
4
of 4 vote
for each string do the following
1. find string length (L), if it is 30 then
2. check s[0] is M and s[L-1] is K if yes then
3. verify rest of 28 characters are matching
if 1,2,3 steps are true then given string is not unique and return
if any of 1,2,3 is false then go for next string
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
traverse the double linked list from head to tail... while traversing make all nodes as 0 and count how many 1's are there... after reaching the tail again traverse from tail to head and make each node 1 and decrement count...do this until count becomes 0...
- algos August 13, 2012