Efficiently print factorial series in a given range
Write an iterative program to print factorial series in a given range efficiently. The factorial n! of a non-negative integer n is the product of all positive integers less than or equal to n.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedWrite an iterative program to print factorial series in a given range efficiently. The factorial n! of a non-negative integer n is the product of all positive integers less than or equal to n.
Write a program to determine if a given number is a palindrome or not. A palindromic number is a number that remains the same when its digits are reversed.
Given two numbers, calculate the maximum number without using a conditional statement or ternary operator.
Given two integers, swap them in a single line in Java.
Write a C/C++ program without using the main() function. We are allowed to change the entry point of the program from main() to any other function or remove the main() function altogether.
This post will discuss how to determine whether two integers are equal without using comparison operators (==, !=, <, >, <=, >=) and arithmetic operators (+, -, *, /, %).
Given a binary array of size two having at least one element as zero, write a single line function to set both its elements to zero. Use of ternary operator and direct assignment of elements are not allowed.
Given a number, determine if it is even or odd without using any conditional statement (if–else) or ternary operator.
Given an integer, find its square without using multiplication and division operator. Also, the use of the power function from any programming language library is not allowed.
Given two integers, multiply them without using the multiplication operator or conditional loops.
Write a program to print a semicolon without using a semicolon anywhere in the program.
Write a program to print all numbers between 1 and N without using a loop.