Difficulty Levels

Choose your challenge. Start easy and work your way up.

213
Total Problems

String X-Pattern

Print a string in an X pattern using the characters from the string on the diagonals and asterisks elsewhere

medium
41

Tree Shadow within Matrix

Count trees whose shadows fall within a rectangular matrix field based on sunlight direction

medium
42

Maximum Target Hits in Sequence

Find the longest consecutive sequence of successful target hits given a series of shooting scores

medium
41

Alphabet Count – Repeated String

Count occurrences of a specific alphabet in a string that has been repeated to reach a specified length

medium
41

Common Factors (X, Y) and (Y, Z)

Find and print common factors of (X, Y) and (Y, Z) in descending order, allowing duplicates

medium
42

Inverted L-Shaped Matrix

Print the elements of a square matrix in an inverted L-shape pattern row by row

medium
42

Function samePositionBitCount – CTS PATTERN

Count the number of positions where two integers have equal bits

medium
42

Function toggleVowelCase – CTS PATTERN

Fix the logical error in the toggleVowelCase function to correctly toggle the case of vowels in a string

medium
42

Musical Bench

Simulate a musical bench game where players move between benches in a circle based on music duration and player speed, eliminating players when benches are removed.

medium
42

Non-overlapping Substring Count

Count the number of non-overlapping occurrences of a pattern string within a given text string.

medium
42

Frequency Sort – Numbers

Sort integers by their frequency in descending order, with ties broken by ascending value

medium
42

Count of Inversions – Base 6 – TCS CodeVita

Count inversions in a derived sequence formed by sum of digits in base 6 representation

medium
42
PrevPage 4 of 9Next