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.

Rearrange an array into a wave form where elements alternate between peaks and valleys: arr[0] >= arr[1] <= arr[2] >= ar...

array sorting greedy
85 points Solve Problem

Given a rectangular matrix, calculate the sum of all elements on the border (first row, last row, first column, last col...

matrix array iteration

Check if one string is a rotation of another string using only one substring operation. A rotation means you can move ch...

string rotation substring

Given a sentence, reverse only the words at odd indices (1-indexed). Words are separated by spaces.

string array

Replace each letter with its "mirror" from the alphabet. A mirrors to Z, B mirrors to Y, C mirrors to X, and so on. Pres...

string character-manipulation

Given a 6-digit number, determine if it's "lucky". A ticket is lucky if the sum of the first 3 digits equals the sum of...

math digit-manipulation

Remove consecutive duplicates from an array, keeping only one occurrence of each consecutive group.

array two-pointers

Find the number of pairs (i,j) where nums[i] == nums[j] and i < j. Count all such valid pairs in the array.

array counting

Given two arrays, determine if one array is a rotation of another. A rotation means elements are shifted circularly.

array rotation string-matching

Given daily stock prices, find the maximum profit from buying and selling once. You must buy before you sell.

array greedy dynamic-programming
Showing 71 to 80 of 100 results
Feedback