GeeksforGeeks
GeeksforGeeks
yesterday at 17:47. Facebook
[ Geeksforgeeks.org Link ]
Given a sorted array, the task is to remove the duplicate elements from the array.
Input : arr[] = {2, 2, 2, 2, 2}
Output : arr[] = {2}
new size = 1
Input : arr[] = {1, 2, 2, 3, 4, 4, 4, 5, 5}
Output : arr[] = {1, 2, 3, 4, 5}
new size = 5
Given a sorted array the task is to remove the duplicate

Remove duplicates from sorted array - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
yesterday at 13:30. Facebook
[ Geeksforgeeks.org Link ]
Tidy Number are those number whose digits are arranged in non-decreasing order. Here, we are given a number and we have to find another number that is smaller but closest to the given number and also that number should be tidy, i.e., their digit should be in non-decreasing order.
Input : 91234
Output : 89999
Tidy property is violated by appearing 1 after 9.
So, we...
View details ⇨
Tidy Number are those number whose digits are arranged in nondecreasing

Find the closest and smaller tidy number - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
yesterday at 05:19. Facebook
[ Geeksforgeeks.org Link ]
Asked in Twitter, Amazon and Samsung
Given an integer N, how many structurally unique binary search trees are there that store values 1...N?
For example, for N = 2, there are 2 unique BSTs
1 2
\ /
2 1
For N = 3, there are 5 possible BSTs
1 3 3 2 1
\ / / ...
View details ⇨
Asked in Twitter Amazon and Samsung Given an integer N how

Unique BST's | Practice | GeeksforGeeks

practice.geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
yesterday at 03:40. Facebook
[ Geeksforgeeks.org Link ]
The problem is to convert the given binary number to its equivalent hexadecimal number.
The input could be very large and may not fit even into unsigned long long int.

Input : 110001110
Output : 18E

Input : 1111001010010100001.010110110011011
Output : 794A1.5B36
The problem is to convert the given binary number to its

Convert a binary number to hexadecimal number - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/27/2017 at 18:52. Facebook
[ Geeksforgeeks.org Link ]
Given two arrays a[] and b[] of same size, we need to swap their contents.

Example :

Input : a[] = {1, 2, 3, 4}
b[] = {5, 6, 7, 8}
Output : a[] = {5, 6, 7, 8}
b[] = {1, 2, 3, 4}
Given two arrays a and b of same size we need

How to quickly swap two arrays of same size in C++? - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/27/2017 at 17:32. Facebook
[ Geeksforgeeks.org Link ]
Given two numbers m and n, count number of m digit numbers that are divisible by n.

Examples:

Input : m = 2
n = 6
Output : 15
Two digit numbers that are divisible by 6
are 12, 18, 24, 30, 36, ....., 96.

Input : m = 3
n = 5
Output :180
Given two numbers m and n count number of m digit

Count of m digit integers that are divisible by an integer n - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/27/2017 at 07:46. Facebook
[ Geeksforgeeks.org Link ]
Given an array of n numbers. Arrange them in a way that yields the largest value. While arranging the order of even numbers with respect to each other and the order of odd numbers with respect to each other should be maintained respectively.
Examples:
Input : {78, 81, 88, 79, 117, 56}
Output : 8179788856117
The numbers are arranged in the order:
81 79 78 88 56 117...
View details ⇨
Given an array of n numbers Arrange them in a way

Biggest number by arranging numbers in certain order - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/27/2017 at 05:24. Facebook
[ Geeksforgeeks.org Link ]
Given a string, find the all distinct (or non-repeating characters) in it. For example, if the input string is “Geeks for Geeks”, then output should be ‘for’ and if input string is “Geeks Quiz”, then output should be ‘GksQuiz’.

The distinct characters should be printed in same order as they appear in input string.

Examples:

Input : Geeks for Geeks
Output :...
View details ⇨
Given a string find the all distinct or nonrepeating characters in

Print all distinct characters of a string in order (3 Methods) - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/27/2017 at 04:17. Facebook
[ Geeksforgeeks.org Link ]
Given a number n, find out the n-th positive number made up of even digits (0, 2, 4, 6, 8) only. Firs few numbers made of even digits are 0, 2, 4, 6, 8, 20, 22, 24…….

Examples:

Input : 2
Output : 2
Second number made of 0, 2, 4, 6, 8 is 2

Input : 10
Output : 28
Given a number n find out the nth positive number made

Find the n-th number made of even digits only - GeeksforGeeks

geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/26/2017 at 17:59. Facebook
[ Geeksforgeeks.org Link ]
Given a BST and a value x the task is to delete the nodes having values greater than or equal to x.
Given a BST and a value x the task is to

Delete nodes with key greater than k | Practice | GeeksforGeeks

practice.geeksforgeeks.org
GeeksforGeeks
GeeksforGeeks
05/26/2017 at 17:22. Facebook
[ Geeksforgeeks.org Link ]
Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot be represented accurately in binary with at most 32 characters, print” ERROR:’
Given a real number between 0 and 1 eg 072 that

Converting a Real Number (between 0 and 1) to Binary String - GeeksforGeeks

geeksforgeeks.org