摘要: A small coding test that I encountered today.QuestionUsing only primitive types, implement a fixed-size hash map that associates string keys with arbi... 阅读全文
posted @ 2015-10-07 23:41 树獭君 阅读(326) 评论(0) 推荐(0)
摘要: ProblemThere areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it cos... 阅读全文
posted @ 2015-10-07 09:45 树獭君 阅读(198) 评论(0) 推荐(0)
摘要: (referrence: GeekforGeeks)Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem.S... 阅读全文
posted @ 2015-10-07 06:17 树獭君 阅读(377) 评论(0) 推荐(0)
摘要: (referrence: cmu_binary_heap)DefinitionA binary heap is a complete binary tree arranged in heap ordering property.There are two types of ordering:1. m... 阅读全文
posted @ 2015-10-07 04:56 树獭君 阅读(436) 评论(0) 推荐(0)
摘要: Complete Binary TreeAccording to wiki,A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, an... 阅读全文
posted @ 2015-10-07 04:22 树獭君 阅读(267) 评论(0) 推荐(0)
摘要: (referrence: GeeksforGeeks)MergeSort is aDivide and Conqueralgorithm. It divides input array in two halves, calls itself for the two halves and then m... 阅读全文
posted @ 2015-10-07 03:26 树獭君 阅读(297) 评论(0) 推荐(0)
摘要: Master theorem provides a solution in asymptotic terms to solve time complexity problem of most divide and conquer algorithms.Recurrence relations of ... 阅读全文
posted @ 2015-10-07 03:05 树獭君 阅读(593) 评论(0) 推荐(0)