Solve | |||||
---|---|---|---|---|---|
count-by | Count By | Implement a function countBy(array, iteratee) that generates an object with keys derived from the results of applying each element of the array to the iteratee function, where the values correspond to the frequency of each key returned by the iteratee, with iteratees supporting both functions and strings as properties. | MEDIUM | ||
trie-data-structure | Trie Data Structure | Implement a trie (prefix tree) and support operations like insertion, search, and delete. Trie is used for efficient retrieval of keys in a dataset of strings. | MEDIUM | ||
topological-sorting | Topological Sorting | Given a directed acyclic graph (DAG), perform a topological sort and return the linear ordering of vertices that respects the partial order. | MEDIUM | ||
binary-search | Binary Search | Given a sorted array of integers, find the target value using binary search. Return the index of the target if found; otherwise, return -1. | MEDIUM | ||
merge-sort | Merge Sort | Implement the Merge Sort algorithm to sort an array of integers. Return the sorted array. | MEDIUM | ||
quick-sort | Quick Sort | Implement the Quick Sort algorithm to sort an array of integers in-place. Return the sorted array. | MEDIUM | ||
dijkstras-shortest-path | Dijkstra's Shortest Path Algorithm | Given a weighted graph and a starting vertex, find the shortest path to all other vertices using Dijkstra's algorithm. Return the shortest distances and paths. | HARD | ||
depth-first-search | Depth-First Search (DFS) | Given a graph, perform a depth-first traversal starting from a specified vertex. Return the order in which vertices are visited. | MEDIUM | ||
breadth-first-search | Breadth-First Search (BFS) | Given a graph, perform a breadth-first traversal starting from a specified vertex. Return the order in which vertices are visited. | MEDIUM | ||
levenshtein-distance | Levenshtein Distance | Given 2 strings, find the minimum number of operations required to change one string to the other. An operation is defined as either replacement of a character, deletion of a character, or addition of a character. This problem is also called Levenshtein Distance. Levenshtein distance is a string metric for measuring the difference between two sequences. | MEDIUM |
Rows per page