## Write a program to reverse digits of a number

Write a program to reverse digits of an integer. Examples : Input : num = 12345 Output : 54321 Input : num = 876 Output… Read More »

- How can one become good at Data structures and Algorithms easily?
- Find maximum in a stack in O(1) time and O(1) extra space
- Cracking Technical Interviews
- Print the nodes of binary tree as they become the leaf node
- Reach the numbers by making jumps of two given lengths
- Lower and Upper Bound Theory
- Shannon-Fano Algorithm for Data Compression
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Dijkstra's shortest path with minimum edges
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- How to write a Pseudo Code?
- Check if it is possible to reach a number by making jumps of two given length
- Code Optimization Technique (logical AND and logical OR)
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- Find the number in a range having maximum product of the digits
- Smallest power of 2 which is greater than or equal to sum of array elements
- Iterative Letter Combinations of a Phone Number
- Ternary Search
- Program to print the Zigzag pattern
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Largest perfect square number in an Array
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find alphabet in a Matrix which has maximum number of stars around it

Write a program to reverse digits of an integer. Examples : Input : num = 12345 Output : 54321 Input : num = 876 Output… Read More »

Parity: Parity of a number refers to whether it contains an odd or even number of 1-bits. The number has “odd parity”, if it contains… Read More »

The very first solution that comes to our mind is the one that we learned in school. If sum of digits in a number is… Read More »

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S… Read More »

Write a function that, for a given no n, finds a number p which is greater than or equal to n and is a smallest… Read More »

Given two integers x and n, write a function to compute xn. We may assume that x and n are small and overflow doesn’t happen.… Read More »

Given a number, find sum of its digits. Examples : Input : n = 687 Output : 21 Input : n = 12 Output :… Read More »

If we take a look at this problem carefully, we can see that the idea of “loop” is to track some counter value e.g. “i=0”… Read More »