Basic Topics
This section provides tutorials on fundamental Data Structures and Algorithm topics, catering to those who are new to the subject.
SortingSorting refers to rearranging elements in a specific order.ArraysAn array is a data structure consisting of a collection of elements.BacktrackingA backtracking algorithm is used to construct a solution recursively by starting with an empty solution and adding solution one by one.Binary SearchBinary search is the searching strategy that reduces the search space by half every iteration until you have found the target.Brute ForceBrute Force is used when the problem size is limitedGreedyDesigning greedy algorithms to find a greedy strategy that produces an optimal solution to the problemHash MapHash Map provides quick lookup of certain values in O(1) time.Heap (Priority Queue)A heap, or a priority queue, is a data structure that efficiently stores elements in a particular order.Kadane AlgorithmKadane 1D algorithm finds the maximum sum subarray in an array of integers. Kadane 2D algorithm finds the maximum sum subarray in a 2D array of integers.Linear SearchLinear search is a searching technique that works in a linear / sequential fashion. It traverses whole of the data structure and returns the position(s) where the value is found. If not found then it simple returns nothing.Linked ListA linked list is a linear data structure that consists of nodes. Each node stores some data as well as the address of the next node.MOD (1e9 + 7)Learn modular arithmetic with 1e9 + 7, including overflow-safe operations and modular inverses.Prefix SumPrefix Sum is the sums of prefixes of the input sequenceQueue & StackStack is the data structure The first item that comes in will be the first to go out.Sliding WindowSliding window is a technique used to solve problems in array or string.Time ComplexityTime Complexity is one of the important measurements when it comes to writing an efficient solution.TrieA trie or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings.Two PointersTwo Pointers is an effective technique used for searching pairs in a sorted array.