« first day  last day (14 days later) » 

10:26 AM
hi
 
@barakmanos Having some problem to understand - stackoverflow.com/questions/7381050/…
can you tell me why in the answer 2 is marked as <- ? not 1,3 or 4 etc
@barakmanos You there ?
 
11:21 AM
hi
 
I err... don't know C.
However I can see what that code is doing, so I could try and get a Python program to do the same thing but I can't translate directly.
 
no need... write a code as per your understanding.. code should be O(n)
and space O(1)
 
Just asking... why not employ someone more experienced? I have only been studying Python for a year and a bit.
 
ok.. Lets see.. if I can find someone ?
or would you post it as a question ?
 
11:38 AM
give me a moment... almost done....
 
k
you can take idea from here, regd what BharatKumar B. said
 
Pretty fast too.
 
it is O(n2)..
 
11:57 AM
That's now getting a bit complex for ability (which is merely intermediate). I do not understand how to improve linear speed at the lower level.
 
np..
 
You realise that I am only 14?
 
Humm... Your answer is nice.. I appreciate you
 
@ArupRakshit: sup
 
@LaszloPapp Need a bit help.. would you ?
Following the link - BharatKumar B. gave one idea...
But I am not getting what does he really mean ?
 
12:09 PM
why would you bother me with this under my irrelevant answer? :)
 
Just to ping you... that deleted.. :)
 
1:09 PM
@RomanC Hi
 
Hi
 
Could you tell me from the link - programingfordata.wordpress.com/2012/08/18/…
what the below code is doing ?
if (zeroCounts > oneCounts) {
endIndex = (oneCounts << 1) – 1;
} else {
endIndex = (zeroCounts << 1) – 1;
}
 
I don't know, some calculations may be, what's this?
 
This is a fragment of code from the link I mentioned..
why such left shift operation is needed.. didn't get
 
don't need but for benchmarks is good
 
1:17 PM
the solution is not well understood by me.. any more tips ?
from you
 
You can watch the expression in the debugger to see what happened with it, what do you want from me?
 
I am not good in Java
I am Ruby dev
but trying to get the trick
to implement in my case
but not understanding,,, so asking if you know any other way
 
Do you know a bitwise operrations in Java/
 
Yes.. that I do no
In Ruby also has
but how is it helpful, that's my point..
 
so you should know what happens with a integer to shift left one bit
 
1:23 PM
it is increasing the value by twice
2.0.0-p353 :004 > 12 << 1
 => 24
2.0.0-p353 :005 > 4 << 1
 => 8
 
good, why not just multiply by two?
 
that I can, but the answerer why applied this technique... not helpful for me... so I am not able to include it in my case... what does it do in overall code
 
As far as I saw It's calculating endIndex in the array.
 
why Integer[] diffMap = new Integer[arr.length * 2 + 1]; the size of diffMap is set as arr.length * 2 + 1 ?
 
Probably it places two subarrays in one then compare, I haven't seen it.
 
1:36 PM
ok
 
Listen if you like algorithms here's an interesting question stackoverflow.com/q/11921616/573032
 

« first day  last day (14 days later) »