• Skip to main content
  • Skip to footer

GO ALGORITHMS

Soluciones de lógica con Golang

  • Fácil
  • Intermedio
  • Avanzado
  • Todos
  • GitHub

Intervals

Merge Overlapping Intervals

Medium

Merge an array of intervals so there are no overlapping intervals, and return the resultant merged intervals.

Example:

Input: intervals = [[3, 4], [7, 8], [2, 5], [6, 7], [1, 4]]
Output: [[1, 5], [6, 8]]

Constraints:

  • The input contains at least one interval.
  • For every index i in the array, intervals[i].start ≤ intervals[i].end.

Identify All Interval Overlaps

Medium

Return an array of all overlaps between two arrays of intervals; intervals1 and intervals2. Each individual interval array is sorted by start value, and contains no overlapping intervals within itself.

Example:

Input: intervals1 = [[1, 4], [5, 6], [9, 10]],
       intervals2 = [[2, 7], [8, 9]]
Output: [[2, 4], [5, 6], [9, 9]]

Constraints:

  • For every index i in intervals1, intervals1[i].start < intervals1[i].end.
  • For every index j in intervals2, intervals2[j].start < intervals2[j].end.

Largest Overlap of Intervals

Medium

Given an array of intervals, determine the maximum number of intervals that overlap at any point. Each interval is half-open, meaning it includes the start point but excludes the end point.

Example:

Input: intervals = [[1, 3], [5, 7], [2, 6], [4, 8]]
Output: 3

Constraints:

  • The input will contain at least one interval.
  • For every index i in the list, intervals[i].start < intervals[i].end.

Footer

Primeros con algoritmia

Amazon Interview | Asteroid Collision | Data Structures & Algorithms

Algoritmos por dificultad en Go

  • Fácil
  • Intermedio
  • Avanzado
  • Todos
  • GitHub

Algoritmos fáciles con Go

  • Amazon Interview | Asteroid Collision | Data Structures & Algorithms
  • Cifrado César
  • Math And Geometry
  • Bit Manipulation
  • Básicas
  • Más usadas
  • Complejas

Algoritmos intemedios con Go

  • Amazon Interview | Asteroid Collision | Data Structures & Algorithms
  • Cifrado César

Algoritmos avanzados con Go

  • Amazon Interview | Asteroid Collision | Data Structures & Algorithms
  • Cifrado César

Copyright © 2026 · Log in