• Skip to main content
  • Skip to footer

GO ALGORITHMS

Soluciones de lógica con Golang

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

Sliding Window

Substring Anagrams

Medium

Given two strings, s and t , both consisting of lowercase English letters, return the number of substrings in s that are anagrams of t.

An anagram is a word or phrase formed by rearranging the letters of another word or phrase, using all the original letters exactly once.

Example:

Input: s = 'caabab', t = 'aba'
Output: 2

Explanation: There is an anagram of t starting at index 1 (“caabab”) and another starting at index 2 (“caabab”)

Longest Substring With Unique Characters

Medium

Given a string, determine the length of its longest substring that consists only of unique characters.

Example:

Input: s = 'abcba'
Output: 3

Explanation: Substring “abc” is the longest substring of length 3 that contains unique characters (“cba” also fits this description).

Longest Uniform Substring After Replacements

Hard

A uniform substring is one in which all characters are identical. Given a string, determine the length of the longest uniform substring that can be formed by replacing up to k characters.

Example:

Input: s = 'aabcdcca', k = 2
Output: 5

Explanation: if we can only replace 2 characters, the longest uniform substring we can achieve is “ccccc”, obtained by replacing ‘b’ and ‘d’ with ‘c’.

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