awesome-algorithm-question-solution icon indicating copy to clipboard operation
awesome-algorithm-question-solution copied to clipboard

LeetCode,《剑指offer》中的算法题的题目和解法以及常见算法的实现

Results 12 awesome-algorithm-question-solution issues
Sort by recently updated
recently updated
newest added

完成所有部分 python3.7.4 的编写

使用 python3.7.4 实现了 13 个链表算法。

链接: https://github.com/knightsj/awesome-algorithm-question-solution/tree/master/%5B3%5D.%20Linked%20List/3.13%20Old%20Evem%20List ![image](https://user-images.githubusercontent.com/14917138/77151725-888ef200-6ad1-11ea-84e9-41c0f1936cd2.png)

根据实现,例子中N只能取到4,根据题目N可以最多取到5。 因此for循环应该从1开始到

应该为Top Kth Frequent (出现频率最高的前k个元素)

判断奇偶性不对吧,应该是&1 bool isOdd(int val){ if (val & 2 == 1){ return true; } else{ return false; } }

斐波那契数列不是从1 开始吗?第一个程序的代码判断是不是有问题呢 int result[2] = {0, 1}; if(n < 2){ return result[n]; } 传入0 返回 0(手动狗头)

冒泡排序,每排一次,最外层的循环可以少一次,不用每次都i < n - 1,除非n--

这个如果链表的第一个节点和第二个节点相同,代码里第一个节点没有移除,比如1->1->2.

add Fibonacci swift version