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.

Convert a string so that every alternate character is uppercase, starting with the first character as uppercase. Non-alp...

string case-conversion alternation character-processing
40 points Solve Problem

For every number from 1 to N, print "Three" if divisible by 3 (but not 9), "DoubleThree" if divisible by 9, or the numbe...

math divisibility conditionals loops

Reverse the digits of two numbers, add the reversed numbers together, then reverse the digits of the sum to get the fina...

math digit-manipulation reversal arithmetic

Sort an array where even numbers are sorted in ascending order and odd numbers are sorted in descending order, while mai...

array sorting even-odd stable-sort

Find the distance between the first and last occurrence of a given character in a string. Distance is the number of posi...

string character-search indexing distance

Given an m×n matrix, print its elements in a zigzag "snake" pattern. Start from top-left, go right in first row, then le...

matrix traversal zigzag pattern

Remove adjacent pairs of the same character from a string repeatedly until no such pairs remain. Process from left to ri...

string stack pair-removal simulation

Given two sorted arrays, merge them into one sorted array. Count and return the minimum number of comparisons needed dur...

array merge sorting two-pointers

A string's "power" is defined as the length of the longest run of identical consecutive characters. Find the maximum pow...

string consecutive-count run-length maximum

Simulate a circular queue rotation k times. After each rotation, the front element moves to the back. Report the front e...

queue circular rotation simulation
Showing 21 to 30 of 100 results
Feedback