Company Retreat

Cerinta completa The LRT Company has employees. Each employee has a unique ID number from to , where the director’s ID is number . Every employee in the company has exactly one immediate supervisor — except the director, who has

BST maintenance

Cerinta completa Consider a binary search tree T which is initially empty. Also, consider the first N positive integers {1, 2, 3, 4, 5, ….., N} and its permutation P {a1, a2, …, aN}. If we start adding these numbers

Array Pairs

Cerinta completa Consider an array of integers, . Find and print the total number of pairs such that where . Input Format The first line contains an integer, , denoting the number of elements in the array. The second line

Burger Happiness

Cerinta completa In Burger Town new burger restaurants will be opened! Concretely, restaurants will open in days, while restaurant will be opened on day and will be located at . The town should be imagined as an one dimensional line

Arrays – DS

Cerinta completa An array is a data structure that stores elements of the same type in a contiguous block of memory. In an array, , of size , each memory location has some unique index, (where ), that can be