There are two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at…… Read more “Kangaroo”

## Apple and Orange

Sam’s house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where s is…… Read more “Apple and Orange”

## Grading Students

HackerLand University has the following grading policy: Every student receives a grade in the inclusive range from 0 to 100. Any grade less than 40 is a failing grade. Sam is a professor at…… Read more “Grading Students”

## Mini-Max Sum

Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum…… Read more “Mini-Max Sum”

## Birthday Cake Candles

Colleen is turning n years old! Therefore, she has n candles of various heights on her cake, and candle i has height height[i]. Because the taller candles tower over the shorter ones, Colleen…… Read more “Birthday Cake Candles”

## Finding Next largest ( inorder predecessor ) and next smallest ( inorder successor) element in a BST (Binary Search Tree)

Given the root of a BST and a key value that may or may not be in the BST, Find the next largest and next smallest Node…… Read more “Finding Next largest ( inorder predecessor ) and next smallest ( inorder successor) element in a BST (Binary Search Tree)”

## Linked List

(Source code for Linked List can be found here –> Linked List) Linked List is a list of elements/whatever you say which are of two kinds: Single…… Read more “Linked List”