Binary Search Tree40 Hash Function39 String Matching36 Topological Sort34 Shortest Path33 Rolling Hash30 Game Theory28 Interactive23 Data Stream21 Monotonic Queue18 Brainteaser17 Randomized12 Merge Sort12 Doubly-Linked List11 Counting Sort10 Iterator9 Concurrency9 Probability and Statistics7 Quickselect7...
After a lot of practice in LeetCode, I've made a powerful binary search template and solved many Hard problems by just slightly twisting this template. I'll share the template with you guys in this post.I don't want to just show off the code and leave. Most importantly, I want to s...
This repository contains the solutions and explanations to the algorithm problems on LeetCode. Only medium or above are included. All are written in C++/Python and implemented by myself. The problems attempted multiple times are labelled with hyperlinks.
前端工程师的 LeetCode 之旅 - 周赛 185 前端工程师的 LeetCode 之旅 - 周赛 200 🧭目录导航 Binary Search Algorithm(二分搜索算法) Two Points (双指针) Binary Tree(二叉树) Recursion(递归) Greedy Algorithm(贪心算法) String (字符串) Linked List(链表) Stack(栈) Heap(堆) Dynamic Programming(动...
Let’s check this one:https://leetcode.com/problems/same-tree/As we can see, we already have a class TreeNode (we are near the topic, yes). publicclassTreeNode{intval;TreeNodeleft;TreeNoderight;TreeNode(){}TreeNode(intval){this.val=val;}TreeNode(intval,TreeNodeleft,TreeNoderight){thi...
K-th smallest element in a Binary Search Tree Level order traversal in spiral form Maximum path sum in a binary tree Preorder to Postorder of BST Check Mirror in N-ary Tree Count Number of Nodes in a Complete Binary Tree (Leetcode Problem Solution) ...
Given a string ring, it represents the code engraved on the outer ring; given another string key, it represents the keyword that needs to be spelled. You need to figure out the minimum number of steps to be able to spell all the characters in the keyword. Initially, the first ...
UseGoogle & well-known Morass blogthen??? (LeetCode problems tend to be on the easier side, but whatever) LeetCodeLeetCodeLeetCode Codeforces Stuff CFCF And that should be more than enough lmao...stop asking and start DOING →Reply
LeetCode Trie Related Problems just search trie LC208: Implement Tree LC211: Add and Search Word-DS design: added word only contains letters. and we have a ‘.’ as a wildcard to match any single char. Solution: this is a classic trie problem, only by looking at this problem we know...
Leetcode#ProblemLevelTagsTimeSpaceLanguageSequence N/A Jump Game II.java Hard [Array, Coordinate DP, DP, Greedy] O(n) O(1) Java 0 N/A Majority Number II.java Medium [Enumeration, Greedy] Java 1 N/A Search a 2D Matrix II.java Medium [Binary Search, Divide and Conquer] Java 2 N/A...