The official repository for our programming kitchen which consists of 50+ delicious programming recipes having all the interesting ingredients ranging from dynamic programming, graph theory, linked lists and much more. All the articles contain beautiful images and some gif/video at times to help clear important concepts.
There are various straightforward ways to solve this problem but while I came across quite a creative approach to solve it in O(1) extra space and O(n) time. The solution involves reversal of an array, which is shared in an article as one of the top 25 interview questions. Let me know what you think of it.
A lot of programmers already working as frontend developers or some starting their journey in javascript, and struggle to practice ds/algorithms for interview preparation.