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: Explanation: There is an anagram of t starting at index 1 (“caabab”) […]
Fast And Slow Pointers
Linked List Loop Easy Given a singly linked list, determine if it contains a cycle. A cycle occurs if a node’s next pointer references an earlier node in the linked list, causing a loop. Example: Linked List Midpoint Easy Given a singly linked list, find and return its middle node. If there are two middle nodes, return […]
Linked Lists
Linked List Reversal Easy Reverse a singly linked list. Example: Remove the Kth Last Node From a Linked List Medium Return the head of a singly linked list after removing the kth node from the end of it. Example: Constraints: Linked List Intersection Easy Return the node where two singly linked lists intersect. If the linked […]
Hash Maps And Sets
Pair Sum – Unsorted Easy Given an array of integers, return the indexes of any two numbers that add up to a target. The order of the indexes in the result doesn’t matter. If no pair is found, return an empty array. Example: Explanation: nums[0] + nums[2] = -1 + 4 = 3 Constraints: Verify Sudoku Board […]
Two Pointers
suma de pares ordenada sugerencia de gemini Pair Sum – Sorted Easy Given an array of integers sorted in ascending order and a target value, return the indexes of any pair of numbers in the array that sum to the target. The order of the indexes in the result doesn’t matter. If no pair is found, return an […]
Operaciones de listas con Go
Los arrays y listas son comunes en todos los lenguajes de programación y golang tienes arrays y slices, en cuanto a los Arrays: Tradicionalmente, un array (o arreglo) se refiere a una colección de elementos de tamaño fijo, donde todos los elementos son del mismo tipo Por lo tanto, aunque ambos términos se refieren a […]
Triángulo de pascal en go
En este corto tutorial mostraré como mostrar las primeras N filas del triángulo de pascal. El triángulo de pascal se puede generar de muchas maneras, entre ellas usando el coeficiente binomial El coeficiente binomial que llamaremos nCk(n,k) es una función matemática que retorna entre otros significados: “La cantidad de formas de escoger k elementos de un conujunto de n disponibles. Para imprimir el triángulo de […]
Notación Bi O
La importancia de saber medir cada algoritmo que implementas O(1) O(long) O(n) O(nlogn) O(n^2) O(2^n) O(n!) Con el pasar del tiempo desarrollamos con más velocidad y vamos conociendo las herramientas en cada uso que les damos, pero no es la primera vez que empiezas a usar herramientas o a implementar código y no sabemos cuanto […]
30 Tipos de algoritmos
Algoritmos de ordenamiento
Algoritmos de búsqueda
Algoritmos de grafos
Algoritmos de árboles
Algoritmos de hashing
Algoritmos de compresión
Algoritmos de encriptación
Algoritmos de aprendizaje automático
Breadth First Search (BFS)
explores the neighbor node (graph) before moving to the next-level ones.






