Given an array where all its elements are sorted except two elements which were swapped, sort the array in linear time. Assume there are no duplicates in the array.
Given an array constructed from another array by taking sum of every distinct pair in it, decode the array to get back the original array elements.
Given two integers x and n where n is non-negative, efficiently compute the value of power function pow(x, n).
Given a MxN matrix, print matrix in spiral order.
Write a program to print all numbers between 1 to N without using semicolon.
Given two integers, swap them without using any third variable.
What should be the if condition in below code snippet, so that output would be “Hello World”. if “condition” printf (“Hello”); else printf(“World”);
Given three integers, find maximum and minimum number between them without using conditional statement or ternary operator.
Given a large number N, find all positive numbers less than N that can be represented as sum of two cubes for at-least two different pairs. In other words, find all positive numbers M less than given number N that can be expressed as M = (a^3 + b^3) = (c^3 + d^3) for …
Write a program to print “Hello World” without writing anything inside main() function i.e. main() function should be empty.
Write a program to print all numbers between 1 to N without using loop.
Write a program to print a semicolon without using semicolon anywhere in the program.
Given two integers, multiply them without using multiplication operator or conditional loops.