Skip to content

Problem Solving

Browse every published problem solving article in Data Structures & Algorithms.

Articles

5 articles

Data Structures & Algorithms · Problem Solving

Number of Islands: Exploring a Grid with Depth-First Search

Count connected regions of land with iterative depth-first search, track visited cells, and implement Number of Islands in C#, Go, and Python 3.

Estimated reading time: 8minutes
  • Graphs
  • Depth-First Search
  • Grids

Data Structures & Algorithms · Problem Solving

Reverse Integer: Reversing Digits Without Overflow

Reverse a signed integer one digit at a time, detect 32-bit overflow before it happens, and handle negative numbers in C#, Go, and Python 3.

Estimated reading time: 6minutes
  • Integers
  • Overflow
  • Problem Solving

Data Structures & Algorithms · Problem Solving

Updated

Valid Parentheses: Matching Brackets with a Stack

Learn why bracket order needs a stack, trace a linear-time solution, and implement Valid Parentheses in C#, Go, and Python 3.

Estimated reading time: 6minutes
  • Stacks
  • Strings
  • Problem Solving

Data Structures & Algorithms · Problem Solving

Binary Search

Find a target in a sorted array with binary search, using an inclusive search range and O(log n) time.

Estimated reading time: 2minutes
  • Algorithms
  • Problem Solving
  • Binary Search

Data Structures & Algorithms · Problem Solving

Two Sum: From Brute Force to a Hash Map

Improve Two Sum from nested loops to a single pass using a dictionary, with C#, Go, and Python 3 examples.

Estimated reading time: 2minutes
  • Algorithms
  • Problem Solving
  • Hash Maps