Problem: Write a program which takes as input two arrays of digits representing integers, and ret...
Problem: Write a program which takes as input an array of digits encoding a decimal integer D and...
Variant#1: Assuming that keys take one of three values, reorder the array so that all objects wit...
Problem: Write a program that takes an array A and an index i into A, and rearranges the elements...
Problem: Write a program to reorder entries in the array with integers so that the even entries a...
Problem: Write a program which tests if two rectangles have a nonempty intersection. If the inter...
Problem: Write a program that takes an integer and determines if that integer’s representation as...
Problem: Generate a random integer i between a and b, inclusive, given a random number generator ...
Problem: Write a program which takes an integer and returns the integer corresponding to the digi...
Problem: Write a program that takes a double x and an integer y and returns x to power of y. You ...
Problem: Given two positive integers, compmute their quotient, using only the addition, subtratio...
’’’ Compute two postive integer number with bit operation only no addition, less or larger operat...
''' Write a program which takes as input a nonegative integer x and return a number y which is no...
''' Write a program that takes a 64bit unsigned integer and returns the 64bit usigned integer con...
''' Problem: swap ith bit with jth bit ''' #Brute force def swap_bit(x, i, j): bit_i = x >&g...
''' Background: The parity of a binary words is 1 if the number of 1s in the word is odd; otherwi...