上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 37 下一页
摘要: Give a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from root node down to the nearest leaf n 阅读全文
posted @ 2017-08-19 04:05 Review->Improve 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given n which is total number of keys in BST, how many BSTs can be formed with n keys. Solution 1. Recursion Solution 2. Dynamic Programming 阅读全文
posted @ 2017-08-18 15:45 Review->Improve 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a 2 dimensional matrix, how many ways you can reach bottom right from top left provided you can only move down and right. 阅读全文
posted @ 2017-08-18 15:26 Review->Improve 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Count Number of Binary Tree Possible given Preorder Sequence. For example, given preorder sequence of {10, 11, 9, 12, 13, 14}, the total possible numb 阅读全文
posted @ 2017-08-18 14:50 Review->Improve 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Write a function to print spiral order traversal of a binary tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. Solution. For a normal l 阅读全文
posted @ 2017-08-18 13:49 Review->Improve 阅读(368) 评论(0) 推荐(0) 编辑
摘要: Given coins of certain denominations and a total, how many ways these coins can be combined to get the total. Dynamic Programming solution State: T[i] 阅读全文
posted @ 2017-08-18 13:30 Review->Improve 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given coins of certain denominations and a total, how many minimum coins would you need to make this total? Dynamic Programming solution State: T[i][j 阅读全文
posted @ 2017-08-18 13:08 Review->Improve 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given some number of floors and some number of eggs, what is the minimum number of attempts it will take to find out from which floor egg will break. 阅读全文
posted @ 2017-08-18 07:08 Review->Improve 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given certain jobs with start and end time and amount you make on finishing the job, find the maximum value you can make by scheduling jobs in non-ove 阅读全文
posted @ 2017-08-18 05:00 Review->Improve 阅读(1416) 评论(0) 推荐(0) 编辑
摘要: Given a rod of length and prices at which different length of this rod can sell, how do you cut this rod to maximize profit. Solution. Dynamic Program 阅读全文
posted @ 2017-08-18 02:10 Review->Improve 阅读(218) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 37 下一页