codechamp
BAN USER
- 8of 10 votes
AnswersFind next higher number with same digits.
- codechamp in United States for Knowledge Graph
Example 1 : if num = 25468, o/p = 25486
Example 2 : if num = 21765, o/p = 25167
Example 3 : If num = 54321, o/p = 54321 (cause it's not possible to gen a higher num than tiz with given digits ).| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Ideas - 1of 7 votes
AnswersGiven an excel column number convert it to excel column alphabet and reverse.
- codechamp in India for AWS
Example : If column number(starts from 0) = 26 : Column alpha = AA.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Brain Teasers Data Structures - 2of 6 votes
AnswersCOUNT 1s in BINARY FORMAT OF A NUMBER.
- codechamp in United States for Search| Report Duplicate | Flag | PURGE
A9 Software Engineer / Developer - 4of 8 votes
AnswersGiven a matrix with only 1s and 0s now find and PRINT SUB MATRIX WITH EQUAL NUMBER OF 0s AND 1s.
- codechamp in United States for Search| Report Duplicate | Flag | PURGE
A9 Software Engineer / Developer - 2of 2 votes
AnswersGiven a list of stock quotes over a month of time,
- codechamp in United States for Search
Return the buy day and sell day which gives the max
profit.| Report Duplicate | Flag | PURGE
A9 Software Engineer / Developer - 0of 0 votes
AnswersYou are given a 2D array and each cell has some eggs in it represented by a number. you have to start at (0,0) you can either move right or left. now when you reach (m,n) you shd hav collected max eggs. WAP to print max number of eggs that can be collected in a given matrix.
- codechamp in United States| Report Duplicate | Flag | PURGE
Zynga - -1of 1 vote
AnswersSUM OF PREVIOUS SMALLER NUMBERS IN ARRAY efficiently. For every given element in the array you should return the sum of previous smaller values you encountered in the array . example : arr = {2, 5,1,9, 3}
- codechamp in United States
for a[0] i.e. 2 , sum = 0, a[1] i.e. 5, sum = 2, similarly for a[4], i.e. 3 , sum = 2+1 = 3.| Report Duplicate | Flag | PURGE
Zynga Software Engineer / Developer Coding - 1of 3 votes
AnswersGiven an array, you should start at index 0, and you can jump
- codechamp in United States
from the current index to a max of " current index + arr[current index]
and make it out of the array at the other end in minimum number of hops.| Report Duplicate | Flag | PURGE
Zynga Software Engineer / Developer Algorithm
It would work because at each node you are storing the sum of smaller values i.e. sum of those nodes towards that particular node's left. and while adding a new node to a tree and if you are moving towards right, ull add tat node's value and the sum value it contains, so u get the sum of previous small numbers.
- codechamp March 27, 2014
Repkevinlmoses, Animator at Accenture
I am Experienced Building Manager who is an expert in public and industrial safety with a preventative mindset against fire ...
Nice solution in c#. Complexity O(n)
- codechamp April 16, 2014onestopinterviewprep.blogspot.com/2014/04/find-next-higher-number-with-same-digits.html