A few days ago, I recommended a warehouse, which implements common algorithms in Python language (see article). Recently, I found another warehouse with more than 25,000 stars on Github, which presents ideas of solving LeetCode problems in the form of animation, which is very worth recommending.
Warehouse instructions
This warehouse uses Java language to realize most algorithms, most of which have animation demonstration, which is very suitable for sorting out problem solving ideas, and also suitable for teaching.
Warehouse address: \
Github.com/MisterBooo/…
Content description
Contains python implementations of common algorithms such as binary trees, sorting, lookups, and so on. These are the skills that algorithm engineers must master. \
File directory
Solutions to leecode’s questions and animated demonstrations \
Figure: Problem # 23 from LeetCode: Merge K sorted lists
Typical code \
(Question No. 23 on LeetCode) :
class Solution {
public ListNode mergeKLists(ListNode[] lists){
if(lists.length == 0)
return null;
if(lists.length == 1)
return lists[0];
if(lists.length == 2) {return mergeTwoLists(lists[0],lists[1]);
}
int mid = lists.length/2;
ListNode[] l1 = new ListNode[mid];
for(int i = 0; i < mid; i++){
l1[i] = lists[i];
}
ListNode[] l2 = new ListNode[lists.length-mid];
for(int i = mid,j=0; i < lists.length; i++,j++){
l2[j] = lists[i];
}
return mergeTwoLists(mergeKLists(l1),mergeKLists(l2));
}
public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
if (l1 == null) return l2;
if (l2 == null) return l1;
ListNode head = null;
if (l1.val <= l2.val){
head = l1;
head.next = mergeTwoLists(l1.next, l2);
} else {
head = l2;
head.next = mergeTwoLists(l1, l2.next);
}
returnhead; }}Copy the code
conclusion
Recently, a warehouse of more than 25,000 stars was found on Github, presenting ideas for solving LeetCode problems in the form of animation, which is highly recommended.
Warehouse address: \
Github.com/MisterBooo/…
Please follow and share ↓↓↓\
ID: 92416895\
Currently, it ranks no.1 in the knowledge planet of machine learning
Past wonderful review \
-
Conscience Recommendation: Introduction to machine learning and learning recommendations (2018 edition) \
-
Github Image download by Dr. Hoi Kwong (Machine learning and Deep Learning resources)
-
Printable version of Machine learning and Deep learning course notes \
-
Machine Learning Cheat Sheet – understand Machine Learning like reciting TOEFL Vocabulary
-
Introduction to Deep Learning – Python Deep Learning, annotated version of the original code in Chinese and ebook
-
The mathematical foundations of machine learning
-
Machine learning essential treasure book – “statistical learning methods” python code implementation, ebook and courseware
-
Blood vomiting recommended collection of dissertation typesetting tutorial (complete version)
-
Installation of Python (Anaconda+Jupyter Notebook +Pycharm)
-
What if Python code is ugly? Recommend a few artifacts to save you
-
Blockbuster | complete AI learning course, the most detailed resources arrangement!