ankeshgupta007's blog

By ankeshgupta007, history, 13 months ago, In English,

Can this be done in O(n^2) space and O(n^3) time? Please share your approach.

Read more »

 
 
 
 
  • Vote: I like it  
  • +5
  • Vote: I do not like it  

By ankeshgupta007, history, 2 years ago, In English,

PROBLEM: https://code.google.com/codejam/contest/11274486/dashboard#s=p2 (JANE FLOWERSHOP)

i am getting wrong answer on large subtask. i used similar concept as binary search and went on digging near to the root of the equation using property that f(x) has a root between a and b if f(a)*f(b)<0 . it works for sample cases also. code: https://gist.github.com/ankesh007/f9e44d3cdf8ed5d8e3e218167c6272a1

please help/share approach.

Read more »

 
 
 
 
  • Vote: I like it  
  • -6
  • Vote: I do not like it