Advanced Algorithms Flashcards
Advanced Algorithms
Advanced algorithms are complex algorithms used to solve specialized problems. Examples include Convex Hull algorithms, Segment Tree, Fenwick Tree (Binary Indexed Tree), Range Minimum Query (RMQ), and Suffix Array with Longest Common Prefix (LCP).
Convex Hull
The Convex Hull of a set of points is the smallest convex polygon that encloses all the points. It is commonly used in computational geometry and is essential for problems like finding the outer boundary of a set of points.
Segment Tree
A Segment Tree is a versatile data structure used for various range-querying operations on an array or list, such as finding the minimum, maximum, or sum of elements within a specified range. It is a binary tree where each node represents a range of elements and stores precomputed information to expedite range queries.
Fenwick Tree (Binary Indexed Tree)
A Fenwick Tree, also known as a Binary Indexed Tree (BIT), is a data structure used to efficiently update and query prefix sums of an array. It enables quick updates and queries for cumulative sums of elements in an array, making it useful for problems like range updates and range queries.
Range Minimum Query (RMQ)
Range Minimum Query (RMQ) refers to the problem of finding the minimum element within a specified range of an array. It is a common problem in computer science and can be efficiently solved using data structures like Segment Trees and Fenwick Trees.
Suffix Array and Longest Common Prefix (LCP)
A Suffix Array is an array of all suffixes of a given string, sorted lexicographically. It is often used in string matching and text compression algorithms. The Longest Common Prefix (LCP) array accompanies the Suffix Array and stores the length of the longest common prefix between adjacent suffixes in the sorted order.