For Q3 .
Sum of all the digits should be 8.
I think ,
42101000 is an answer.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/2nUWgrZuNvAJ.
To post to this
@Vikas It was my observation.
@abhishek Sum of digits will be 8 because all the digits tell you the number
of times they appear
Lets just say the number is
Number -- a b c d e f g h
@Digits0 1 2 3 4 5 6 7
a+b+c+d+e+f+g+h = 8
One more observation :
a*0 + b*1 + c*2 + d*3 + e*4 + f*5 + g*6 +
I don't think if there can be more than one possible answer to this
question.Q3
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/iCMXpZK37E0J.
To post to
Asymptotic complexity can never be better than O(n).
But you can reduce the number of exact comparisons from 2n to 3n/2 .
Take pair of numbers in each iteration and compare them.
Then compare the smaller to Min and greater to Max .
This way, you have 3 comparisons for every iteration where the
You can find many sites which classify SPOJ problems.
The one I know is
http://vnoi.info/index.php?option=com_vojtask=classifysite=spoj
By the way , that one is a very simple DP problem.
On Jul 1, 9:49 pm, prathimzn prathi...@gmail.com wrote:
can anyone tell me hoe to think with DP in this