HackerRank

Apr 22, 2025 HackerRank

Palindrome Index

Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome.

Read more →
May 15, 2025 HackerRank

Service Lane

A driver is driving on the freeway. The check engine light of his vehicle is on, and the driver wants to get service immediately.

Read more →
May 07, 2025 HackerRank

Sales by Match

There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks.

Read more →
May 19, 2025 HackerRank

Minimum Distances

The distance between two array values is the number of indices between them. Given , find the minimum distance between any pair of equal elements in the array.

Read more →
Mar 16, 2025 HackerRank

Staircase

Its base and height are both equal to . It is drawn using # symbols and spaces. The last line is not preceded by any spaces.

Read more →
May 02, 2025 HackerRank

Marc's Cakewalk

Marc loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Marc can walk a distance to expend those calories.

Read more →
May 13, 2025 HackerRank

Number Line Jumps

You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction.

Read more →
Jun 08, 2025 HackerRank

Print in Reverse

Given a pointer to the head of a singly-linked list, print each value from the reversed list. If the given list is empty, do not print anything.

Read more →
Jun 22, 2025 HackerRank

Postorder Traversal

Complete the function in the editor below. It received parameter: a pointer to the root of a binary tree. It must print the values in the tree's postorder.

Read more →
Apr 19, 2025 HackerRank

Pangrams

A pangram is a string that contains every letter of the alphabet. Given a sentence determine whether it is a pangram in the English alphabet

Read more →