Reputation
Next privilege 200 Rep.
See reduced ads
Badges
6
Impact
~4k people reached

  • 0 posts edited
  • 0 helpful flags
  • 6 votes cast
Oct
5
comment Looking for a dynamic programming solution
@WinstonEwert I think the problem statement should have put a limit on number of X. i.e. n(X) <= number of elements seen so far or it should be specified that if no element exists, return null.
Sep
30
comment Looking for a dynamic programming solution
@dasblinkenlight X is the smallest element seen so far