Algorithms

Algorithms

10 posts found.
Two Pointer Problems (Part 2) - Sliding Window

Two Pointer Problems (Part 2) - Sliding Window

Two pointers are used to scan in two directions during traversal, achieving the desired algorithmic goals.

in
Binary Search

Binary Search

Binary search is a common method for finding a specific value in a sorted array. It doesn't need to traverse the entire sequence; it only needs to focus on the boundaries and the middle value of the sequence. Therefore, its time complexity can reach O(log n).

in
Dynamic Programming (Part 4): Longest Increasing Subsequence (LIS)

Dynamic Programming (Part 4): Longest Increasing Subsequence (LIS)

The core idea of dynamic programming lies in breaking down a problem into smaller subproblems and storing previous computation results to reduce computational complexity.

in
Binary Tree Basics (Part 3) - Segment Tree

Binary Tree Basics (Part 3) - Segment Tree

A binary tree is an ordered tree where each node has a maximum of two children. It is the simplest and most essential type of tree.

in
Two Pointer Problems (Part 1) - Two Pointer and Fast Slow Pointer

Two Pointer Problems (Part 1) - Two Pointer and Fast Slow Pointer

Two pointers are used to scan in two directions during traversal, achieving the respective algorithmic goals.

in
Binary Trees Basics (Part 2) - Binary Search Trees (BSTs)

Binary Trees Basics (Part 2) - Binary Search Trees (BSTs)

A binary tree is a tree in which each node has at most two children, making it a simple yet fundamental tree structure.

in
Dynamic Programming Series on Stock Problems

Dynamic Programming Series on Stock Problems

The core idea of dynamic programming lies in breaking down a problem into subproblems, retaining previous computational results to reduce the amount of computation needed.

in
Binary Trees Basics (Part 1) - Understanding Binary Trees

Binary Trees Basics (Part 1) - Understanding Binary Trees

A binary tree is a fundamental type of tree structure where each node has at most two child nodes, making it one of the simplest and most important trees.

in
Dynamic Programming (Part 2) - Optimal Subsequence Series

Dynamic Programming (Part 2) - Optimal Subsequence Series

The core idea of dynamic programming lies in breaking down a problem into smaller subproblems, retaining previously computed results to reduce computational effort.

in
Dynamic Programming (Part 1) - House Robber Series

Dynamic Programming (Part 1) - House Robber Series

The core idea of dynamic programming lies in breaking down a problem into smaller subproblems and retaining previously computed results to reduce computational complexity.

in