smurugu
BAN USERThis is a reverse level order traversal problem. Modify the level order traversal code , insert a statement to insert the data into the stack where you would normally print the data. After you visited all the nodes. Now pop everything from stack, as you pop and print you should see node's data printed in reverse level order traversal.
some one down voted my answer, can you explain why this is not correct
I would build a circular queue with a size (5 max size of the password). Once the queue is full, collect the elements and validate against the correct password. If the password does not match return error and reset the queue. this way user can enter next set of password.
- smurugu October 18, 2016Assuming that both mobile & web app are hitting the search endpoints; the issue is on the mobile app. I would check the network call logs to the endpoint and ensure that its returning proper response. If the response is good then its the problem with mobile app rendering search results, there could be various reasons but the issue is narrowed down..
- smurugu October 18, 2016
I think this is a map-reduce problem. you can simply count or build some sort of reduced stack in reducer process
- smurugu December 15, 2017