摘要:
A small coding test that I encountered today.QuestionUsing only primitive types, implement a fixed-size hash map that associates string keys with arbi... 阅读全文
摘要:
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... 阅读全文
摘要:
(referrence: GeekforGeeks)Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem.S... 阅读全文
摘要:
(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... 阅读全文
摘要:
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... 阅读全文
摘要:
(referrence: GeeksforGeeks)MergeSort is aDivide and Conqueralgorithm. It divides input array in two halves, calls itself for the two halves and then m... 阅读全文
摘要:
Master theorem provides a solution in asymptotic terms to solve time complexity problem of most divide and conquer algorithms.Recurrence relations of ... 阅读全文