Algorithms And Data Structures

Backtracking ๐Ÿ‡บ๐Ÿ‡ธ

Backtracking is a method used to solve problems by building potential solutions step by step. If it becomes clear that a partial solution cannot lead to a valid final solution, the process "backtracks" by undoing the last step and trying a different path. This approach is commonly applied to constra...

Brain Teasers ๐Ÿ‡บ๐Ÿ‡ธ

Programming puzzles and brain teasers are a fun way to sharpen your coding and problem-solving skills. Youโ€™ll often see them in technical interviews, where theyโ€™re used to test how you think, analyze problems, and come up with efficient solutions. To do well, it helps to practice and build solid str...

Graphs ๐Ÿ‡บ๐Ÿ‡ธ

In many areas of life, we come across systems where elements are deeply interconnected, whether through physical routes, digital networks, or abstract relationships. Graphs offer a flexible way to represent and make sense of these connections...

Math Set Relationship ๐Ÿ‡บ๐Ÿ‡ธ

Starting from a finite set, we can construct pairs, sequences, subsets, and orderings. For each construction, these notes explain what counts as a distinct result, how many results exist, and the time and storage required to generate them...

Basic Concepts ๐Ÿ‡บ๐Ÿ‡ธ

Data structures and algorithms are fundamental tools for writing efficient software. They determine how a program organizes information and how much work it performs; implementation choices, I/O, and hardware also affect performance...

Searching ๐Ÿ‡บ๐Ÿ‡ธ

Searching is the task of finding whether a particular value exists in a collection and, if it does, where it lives (its index, pointer, node, or associated value). It shows up everywhere: checking if a username is taken, locating a record in a database, finding a file in an index, routing packets, o...

Greedy Algorithms ๐Ÿ‡บ๐Ÿ‡ธ

Greedy algorithms are the โ€œmake progress nowโ€ strategy: build a solution one step at a time, and at each step take the option that looks best right now according to a simple rule (highest value, earliest finish, smallest weight, smallest distance label, etc.). You keep the choice only if it doesnโ€™t ...

Dynamic Programming ๐Ÿ‡บ๐Ÿ‡ธ

Dynamic Programming (DP) is a way to solve complex problems by breaking them into smaller, easier problems. Instead of solving the same small problems again and again, DP stores their solutions in a structure like an array, table, or map. This avoids wasting time on repeated calculations and makes t...

Sorting ๐Ÿ‡บ๐Ÿ‡ธ

Sorting arranges a collection of items according to a defined ordering, such as ascending numeric value or a record's timestamp. The comparison rule must be consistent; contradictory comparisons make a sorted result ill-defined...

Matrices ๐Ÿ‡บ๐Ÿ‡ธ

Matrices represent images, game boards, and maps. Many classic problems reduce to transforming matrices, traversing them, or treating grids as graphs for search...

Data Structures ๐Ÿ‡บ๐Ÿ‡ธ

In computer science, a collection (often interchangeably referred to as a container) is a data structure that holds multiple values. These may be simple elements like numbers or text strings, or more complex objects like user-defined structures. Collections help you store, organize, and manipulate d...