(HashMap – O(n) time, O(n) space)
When using a PDF, cover the solution. Try to write your code on a whiteboard or a plain text editor before checking the answer.
Several contributors have curated extensive collections of Java problems that you can download as PDFs for offline study:
Don't just download the PDFs and let them rot in your "Downloads" folder. Here is a weekly training regimen:
(HashMap – O(n) time, O(n) space)
When using a PDF, cover the solution. Try to write your code on a whiteboard or a plain text editor before checking the answer.
Several contributors have curated extensive collections of Java problems that you can download as PDFs for offline study:
Don't just download the PDFs and let them rot in your "Downloads" folder. Here is a weekly training regimen: