mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-09-22 05:05:53 +08:00
chore: sync content to repo (#10351)
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
This commit is contained in:
co-authored by
nilbuild
parent
71c5cce41d
commit
b79e7bbdb6
@@ -1,3 +1,3 @@
|
||||
# A* Algorithm
|
||||
|
||||
A* is a pathfinding and graph traversal algorithm that finds the shortest path between two nodes. It combines the guarantees of Dijkstra's algorithm with a heuristic that estimates the remaining distance, guiding the search toward the goal and exploring far fewer nodes in practice.
|
||||
A\* is a pathfinding and graph traversal algorithm that finds the shortest path between two nodes. It combines the guarantees of Dijkstra's algorithm with a heuristic that estimates the remaining distance, guiding the search toward the goal and exploring far fewer nodes in practice.
|
||||
@@ -1,3 +1,3 @@
|
||||
# Cyclic Sort
|
||||
|
||||
Cyclic sort is a sorting technique for arrays whose values fall in a known, contiguous range, typically `1` to `n`. Each element is swapped to the position matching its value, placing everything correctly in O(n) time and O(1) space — ideal as a building block for problems such as finding missing or duplicate numbers.
|
||||
Cyclic sort is a sorting technique for arrays whose values fall in a known, contiguous range, typically `1` to `n`. Each element is swapped to the position matching its value, placing everything correctly in O(n) time and O(1) space — ideal as a building block for problems such as finding missing or duplicate numbers.
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Fast and Slow Pointers
|
||||
|
||||
The fast and slow pointers pattern uses two pointers that traverse a data structure at different speeds. It is commonly used to detect cycles in linked lists, find the middle of a list, or locate the kth element from the end, running in O(n) time with constant space.
|
||||
The fast and slow pointers pattern uses two pointers that traverse a data structure at different speeds. It is commonly used to detect cycles in linked lists, find the middle of a list, or locate the kth element from the end, running in O(n) time with constant space.
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
|
||||
Insertion sort is a simple sorting algorithm that works by iteratively inserting each element of an unsorted list into its correct position in a sorted portion of the list. It is like sorting playing cards in your hands. You split the cards into two groups: the sorted cards and the unsorted cards. Then, you pick a card from the unsorted group and put it in the right place in the sorted group.
|
||||
|
||||
- Start with the second element as the first element is assumed to be sorted.
|
||||
- Compare the second element with the first if the second is smaller then swap them.
|
||||
- Move to the third element, compare it with the first two, and put it in its correct position
|
||||
- Repeat until the entire array is sorted.
|
||||
* Start with the second element as the first element is assumed to be sorted.
|
||||
* Compare the second element with the first if the second is smaller then swap them.
|
||||
* Move to the third element, compare it with the first two, and put it in its correct position
|
||||
* Repeat until the entire array is sorted.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Island traversal
|
||||
|
||||
Island traversal is a grid-based technique used to find connected regions of cells that share a common value, typically `1`s in a binary matrix. It combines grid traversal with depth-first or breadth-first search — often with visited tracking — to count islands, measure their size, or analyze their shape.
|
||||
Island traversal is a grid-based technique used to find connected regions of cells that share a common value, typically `1`s in a binary matrix. It combines grid traversal with depth-first or breadth-first search — often with visited tracking — to count islands, measure their size, or analyze their shape.
|
||||
@@ -1,3 +1,3 @@
|
||||
# Kth Element
|
||||
|
||||
Kth element problems ask you to find the kth smallest (or largest) element in a collection without fully sorting it. Common solutions include heaps, quickselect, or sorting, depending on the constraints — a pattern that also appears in questions about arrays, streams, and binary search trees.
|
||||
Kth element problems ask you to find the kth smallest (or largest) element in a collection without fully sorting it. Common solutions include heaps, quickselect, or sorting, depending on the constraints — a pattern that also appears in questions about arrays, streams, and binary search trees.
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Merge Intervals
|
||||
|
||||
The merge intervals pattern deals with overlapping ranges, typically merging a list of intervals that intersect. The standard approach sorts the intervals by start time and then folds them together in a single pass — a technique used in scheduling, availability, and range problems.
|
||||
The merge intervals pattern deals with overlapping ranges, typically merging a list of intervals that intersect. The standard approach sorts the intervals by start time and then folds them together in a single pass — a technique used in scheduling, availability, and range problems.
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Multi-threaded
|
||||
|
||||
Multi-threaded algorithms divide work across multiple threads to run faster on multi-core machines. Common patterns include parallel divide-and-conquer, thread-safe queues for producer-consumer flows, and careful synchronization to avoid race conditions — with quality often measured by speedup and scalability.
|
||||
Multi-threaded algorithms divide work across multiple threads to run faster on multi-core machines. Common patterns include parallel divide-and-conquer, thread-safe queues for producer-consumer flows, and careful synchronization to avoid race conditions — with quality often measured by speedup and scalability.
|
||||
Reference in New Issue
Block a user