Mr WordPress on Hello world!
Tag Archives: Algorithm
1. BITT Principle Brute Force （暴力解法，低效/费空间） Improvement （优化解法，高效/省空间） Time and space complexity （时间/空间复杂度） Test （测试） 2. Array is sorted and may have better performance （3Sum o(n^2) solution) 数组排序过后可能有奇效 3. Test cases are designed on purpose to test the functionality, not … Continue reading
1. Programming, programming, programming Keep brushing up algorithm and data structure problems Summarize the approach and the process to figure out solution 多刷题 多总结（回顾解题思路） 2. Technical Knowledge: Breadth vs Depth Concentrate on one in early stage, then learn about more 职业早期专精一门，之后拓展广度 … Continue reading
1. Array is easy to index specific element with index, it’s easier to calculate the difference between different elements than linked list. 2. LeetCode Trap Rain Water problem: iterate left and right elements for each element in the input array, … Continue reading
Array Tips: keep two points and shrink from left and right to center, check to meet certain requirement (sum equals a target number) until left index is over right one. Problems: Two Sum, 3Sum, 3Sum Closest, 4Sum, etc. … Continue reading
Recently I played an algorithm and data structure question which is called Counting Anagrams, its requirement is like: Input 2 abdcghbaabcdij bcda bbbababaaabbbb ab Output 2 0 8 6 2 3 4 5 6 9 As first … Continue reading
Dynamic Programming (optimally plan processes) Dynamic programming is a very powerful algorithmic paradigm in which a problem is solved by identifying a collection of subproblems and tackling them one by one, smallest first, using the answers to small problems to help … Continue reading