zhutingBacktrackingBacktracking is a technique that explores multiple paths to find the solution. It builds the solution step by step by increasing values…Jan 5, 2023Jan 5, 2023
zhutingIn-place Reversal of a Linked ListThe in-place reversal of a linked list pattern allows us to reverse a linked list without any additional memory, using only the given…Dec 9, 2022Dec 9, 2022
zhutingMerge IntervalsIn a lot of problems involving intervals, we either need to find overlapping intervals or merge intervals if they overlap.Jun 7, 2022Jun 7, 2022
zhuting0/1 Knapsackhttps://www.educative.io/courses/grokking-dynamic-programming-patterns-for-coding-interviews/RM1BDv71V60Jun 5, 2022Jun 5, 2022
zhutingTwo pointersIn problems where we deal with sorted array and need to find a set of elements that fulfill certain constraints, the Two Pointers approach…May 31, 2022May 31, 2022
zhutingTopological SortTopological Sort of a directed graph is a linear ordering of its vertices such that for every directed edge (U, V) from vertex U to vertex…May 29, 2022May 29, 2022
zhutingFast and slow pointersThe Fast & Slow pointer approach is a pointer algorithm that uses two pointers which move through the array at different speeds. This…May 26, 2022May 26, 2022
zhutingSliding WindowIn many problems dealing with an array (or a LinkedList), we are asked to find something among all the subarrays of a given size.May 22, 2022May 22, 2022
zhutingProofs by InductionProofs by induction come up all the time in computer science.Jul 8, 2021Jul 8, 2021
zhutingGraphs basicsThis post explains what graphs are, what they are good for, and the most common ways to represent them in a computer program.Jul 10, 2021Jul 10, 2021
zhutingTree Breadth First SearchGiven a binary tree, populate an array to represent its level-by-level traversal. You should populate the values of all nodes of each level…Jul 24, 2021Jul 24, 2021
zhutingTree Depth First SearchA tree is a data structure that can have values of any data type and is made up of nodes, connected by edges.Jul 25, 2021Jul 25, 2021
zhutingDijkstra’s shortest-path algorithmThe Dijkstra’s shortest-path algorithm works in any directed graph with non-negative edge lengths, and it computes the lengths of shortest…Aug 1, 2021Aug 1, 2021
zhuting算法导论学习笔记(第1天)Description. An introduction to fundamental data types, algorithms, and data structures. Our emphasis is on applications and scientific…Feb 19, 2020Feb 19, 2020