Coding Problems

Practice algorithmic problems and improve your coding skills

Guest Access: You can view 1 problem. Register to solve problems and track your progress.

Calculate the total typing distance between two words using a standard QWERTY keyboard layout. Distance is measured as M...

string manhattan-distance keyboard-layout calculation
85 points Solve Problem

Given a sentence, shuffle the words such that no word remains in its original position. Return any valid arrangement whe...

string derangement permutation shuffling

Given a dictionary of words and a target string, count how many dictionary words appear in the string when reversed.

string dictionary reversal substring-search

Encode a string as character-frequency pairs sorted by character. Format: each character followed by its frequency count...

string frequency-counting encoding sorting

Find the length of the longest substring where vowels and consonants alternate. Vowels are a, e, i, o, u.

string alternating-pattern vowel-consonant substring

You are a city planner tasked with optimizing the road network of Bridge City. The city has n intersections (nodes) conn...

graph cycle-detection spanning-tree minimum-cut

Given house positions on a line and WiFi routers with their ranges, check if every house gets WiFi coverage. Return "YES...

array range-coverage interval-checking geometry

Simulate a cleaning robot in a grid. Robot starts at (0,0), cleans cells marked "C", avoids obstacles "#", and consumes...

simulation grid pathfinding optimization

In a matrix of 0s (water) and 1s (land), find islands that are completely surrounded by water with no border contact. Is...

matrix island-counting dfs border-detection

Find the maximum sum of any rectangular submatrix in a 3D matrix. Consider all possible 3D rectangular regions and retur...

3d-matrix submatrix-sum dynamic-programming optimization
Showing 1 to 10 of 100 results
Feedback