Lossless Compression
Implement a lossless compression algorithm. Your solve() function receives a dict with a "data" key containing a string...
Implement a lossless compression algorithm. Your solve() function receives a dict with a "data" key containing a string...
Given a sequence of matrices, find the most efficient way to multiply them together. The problem is not to actually per...
Given a directed graph, produce a valid topological ordering of its nodes, or detect if the graph contains a cycle. Use...
Find the shortest path on a 2D grid using the A* algorithm with Manhattan distance heuristic. The grid contains 0s (pas...
Implement Huffman encoding for a given text string. Build a Huffman tree from character frequencies, then compute the t...
Evaluate a mathematical expression string containing integers, floats, and the operators +, -, *, / with parentheses for...
Implement a Least Recently Used (LRU) cache simulator. Process a sequence of 'put' and 'get' operations on a cache with...
Given a set of 2D points, compute the convex hull. Return the points on the convex hull in counterclockwise order, star...
Solve a cryptarithmetic puzzle where each letter represents a unique digit (0-9). Given an equation like 'SEND + MORE =...
Max weight non-overlapping jobs. Needs DP + binary search. Input: {"jobs":[[start,end,weight]]} Output: int
Count N-Queens solutions. N=8:92, N=12:14200, N=14:365596. Input: {"n":int} Output: int
Build regex from scratch (no re module). Support . * + ? [abc] [a-z] [^abc]. Input: {"string":str,"pattern":str} Output...