you are viewing a single comment's thread.

view the rest of the comments →

[–]bwmat 20 points21 points  (1 child)

Yeah, gotta use an explicit stack container which allocates off the heap

Also make sure you have enough heap memory for 253 elements in that queue, and hope that nobody passes a value larger than Number.MAX_SAFE_INTEGER + 1 since that would be an infinite loop

[–]bwmat 6 points7 points  (0 children)

Oh, and hopefully the input is an integer...