Pages
(Move to ...)
Home
Info
HowTo
Code
Publications
Finance
Links
Legal
▼
21/11/2017
[Java] Merge sorted files
›
Here is a problem that takes more time to code than to figure out: given N files where each line contains a timestamp (as long) and some dat...
14/11/2017
[Java] Implement locking mechanism using a binary tree
›
This is an interesting exercise: implement a locking mechanism backed by a tree structure with parent pointers where a node can be locked if...
12/11/2017
[Java] Find duplicate element in array with binary search
›
Disclaimer: this solution comes from interviewcake , where they mention this as being easier to (I guess) derive than the ones we saw before...
[Java] Find duplicate element in array in constant space and linear time v2
›
Well a good night's sleep always helps apparently. Yesterday we saw how to find a duplicate element in a constrained array in linear tim...
11/11/2017
[Java] Find duplicate element in array in constant space and linear time
›
Sooo.. spoiler alert: this one was way harder than it should be thanks to 0-index arrays . Given an array of integers in the range 1..N an...
07/11/2017
[Java] Convert expression to reverse polish notation
›
The closing chapter of my RPN journey, how to convert an infix notation expression to a postfix notation one, so from 3 + 4 we get 3 4 + ...
05/11/2017
[Java] Evaluate reverse polish notation in constant space
›
Yes it is possible, yes it took me one full day research included, but the RPN can be evaluated in O(N) time and O(1) space, sacrificing th...
‹
›
Home
View web version