encontrar el inicio de un ciclo en una lista enlazada. La imagen que subiste anteriormente es precisamente el ejemplo visual que utiliza el autor para explicar el Algoritmo de Floyd (también conocido como el algoritmo de “la liebre y la tortuga”). Algoritmo para el Cifrado Cesar en Go, común cuando inicias en criptografía y fácil […]
In-Place
Algoritmo para el Cifrado Cesar en Go, común cuando inicias en criptografía y fácil de implementar, solo que en momentos de presión puedes llegar a hacer algo complicado cuando en realidad lo puedes resolver con un poco de aritmética (simple). Algoritmo para el Cifrado Cesar en Go, común cuando inicias en criptografía y fácil de […]
Amazon Interview | Asteroid Collision | Data Structures & Algorithms
Problem Statement We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the […]
Cifrado César
Algoritmo para el Cifrado Cesar en Go, común cuando inicias en criptografía y fácil de implementar, solo que en momentos de presión puedes llegar a hacer algo complicado cuando en realidad lo puedes resolver con un poco de aritmética (simple).
Math And Geometry
Spiral Traversal Medium Return the elements of a matrix in clockwise spiral order. Example: Reverse 32-Bit Integer Medium Reverse the digits of a signed 32-bit integer. If the reversed integer overflows (i.e., is outside the range [−231−231, 231−1231−1]), return 0. Assume the environment only allows you to store integers within the signed 32-bit integer range. Example 1: Example […]
Bit Manipulation
Hamming Weights of Integers Easy The Hamming weight of a number is the number of set bits (1-bits) in its binary representation. Given a positive integer n, return an array where the ith element is the Hamming weight of integer i for all integers from 0 to n. Example: Explanation: Number Binary representation Number of set bits 0 0 0 1 1 1 2 10 1 3 […]
Sort And Search
Sort Linked List Medium Given the head of a singly linked list, sort the linked list in ascending order. Example: Sort Array Medium Given an integer array, sort the array in ascending order. Example: Kth Largest Integer Medium Return the kth largest integer in an array. Example: Constraints: Dutch National Flag Medium Given an array of 0s, 1s, and 2s representing red, […]
Greedy
Jump to the End Medium You are given an integer array in which you’re originally positioned at index 0. Each number in the array represents the maximum jump distance from the current index. Determine if it’s possible to reach the end of the array. Example 1: Example 2: Constraints: Gas Stations Hard There’s a circular route which […]
Dynamic Programming
Climbing Stairs Easy Determine the number of distinct ways to climb a staircase of n steps by taking either 1 or 2 steps at a time. Example: Minimum Coin Combination Medium You are given an array of coin values and a target amount of money. Return the minimum number of coins needed to total the target amount. If this isn’t possible, […]
Backtracking
Find All Permutations Medium Return all possible permutations of a given array of unique integers. They can be returned in any order. Example: Find All Subsets Medium Return all possible subsets of a given set of unique integers. Each subset can be ordered in any way, and the subsets can be returned in any order. Example: N Queens Hard […]





