VIJAY TRIPATHI
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Store Binary tree's inorder and preorder traversal in a "single" array of say 2n or 2n+1 elements. work on starting n indices as inorder array and ending n indices as preorder array.
We have 2n elements but array is only one. :) Did i miss something please do tell.
Comment hidden because of low score. Click to expand.
0
of 0 vote
1. Consider the game as Directed Graph where every node has a directed edge of cost 1 to it's next 6 nodes . In addition a directed edge of cost 0 from bottom of ladder to top of ladder and directed edge of cost zero from snake's mouth to it's tail.
2. After this initialization apply single source shortest path (Bellman Ford) from 1 for 100.
the cost will be number of dice rolls.
Please comment if i missed some thing.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
A BackTrack Solution.
- VIJAY TRIPATHI August 28, 20131. choose all the words of length 1,2,3,.... n*n.
2. whenever a word of certain length is found compute all it's permutation and print them one by one.