Lena Sort

Cerinta completa Lena developed a sorting algorithm described by the following pseudocode: lena_sort(array nums) { if (nums.size <= 1) { return nums; } pivot = nums[0]; array less; array more; for (i = 1; i < nums.size; ++i) { //

King Richard’s Knights

Cerinta completa King Richard is leading a troop of knights into battle! Being very organized, he labels his knights and arranges them in an square formation, demonstrated below: Before the battle begins, he wants to test how well his knights

King and Four Sons

Cerinta completa The King of Byteland wants to grow his territory by conquering other countries. To prepare his heirs for the future, he decides they must work together to capture each country. The King has an army, , of battalions;

Jim and the Orders

Cerinta completa Jim’s Burgers has a line of hungry customers. Orders vary in the time it takes to prepare them. Determine the order the customers receive their orders. Start by numbering each of the customers from to , front of

Greedy Florist

Cerinta completa A group of friends want to buy a bouquet of flowers. The florist wants to maximize his number of new customers and the money he makes. To do this, he decides he’ll multiply the price of each flower

Grading Students

Cerinta completa HackerLand University has the following grading policy: Every student receives a in the inclusive range from to . Any less than is a failing grade. Sam is a professor at the university and likes to round each student’s

Fun Game

Cerinta completa Kyle and Mike are bored on a rainy day and decide to pass the time by creating a new game having the following rules: The game starts with two -sized integer arrays, and , and is played by

Flipping bits

Cerinta completa You will be given a list of 32 bit unsigned integers. Flip all the bits ( and ) and return the result as an unsigned integer. Example . We’re working with 32 bits, so: Return . Function Description