- Word Ladder :
- http://www.programcreek.com/2012/12/leetcode-word-ladder/ -
If you are queueing and removing the element from the dict as done here, then you can calculate the minimum length. But you cannot calculate all possible lengths. As you remove it from the dict, that state is into the queue. All that matters is whether the end is reachable from that state or not. We dont care if we can reach that state from any other state or not. - http://yucoding.blogspot.com/2013/08/leetcode-question-127-word-ladder.html - Double breadth first search. This is a very good post to learn bi directional search.
- Scramble string leetcode : http://www.lifeincode.net/programming/leetcode-scramble-string-java/ Understand the DP part
- Permutations : http://www.lifeincode.net/programming/leetcode-permutations-and-permutations-ii-java/
- K Sum - http://lifexplorer.me/leetcode-3sum-4sum-and-k-sum/ -
- Solve the KSum problem better one and also solve the 4sum yourself.
- Combinations(n,k) - http://lifexplorer.me/leetcode-combinations/
- Spiral Matrix : http://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/
Apart from coding and design interview questions, this page contains updates on my learnings with Java. It helps me organize my learning. Read about my future self here : https://siliconvalleystories.blogspot.com/
Sunday, 11 January 2015
LeetCode Solutions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment