This is a basic array problem found in various coding platforms. While the name of the problem (as well the article) is pretty cheesy the actual requirement is quite straightforward. You are given an array of non-negative integers stored in an unsorted fashion. The idea is to find out the maximum of the differences that... Continue Reading →
Two numbers add up to target
Given an array find the indices of two numbers such that they add up to the given target. This is a fundamental data structure problem often asked in tech interviews. I have provided a solution here in this article which solves the problem in O(n) time and O(n) extra space. However, I think, a more... Continue Reading →
Recursive code to remove Nth node from the end of a singly linked list
It's been a while since I have written something here. A lot of work is going on and haven't got much time tbh. So, here's a piece of recursive code to delete the N-th node from the end of a singly linked list. The problem statement (from leetcode) is as follows: Given the head of a linked... Continue Reading →
A word on virtual environment
virtual environment and how to create one.. What I cannot create, I do not understand. โ Richard Feynman. What is a virtualenvironment ? A virtualenvironment is basically an isolated environment that we create in our system to have separate work environment for all the concurrent projects that we work on or let's say plan to work... Continue Reading →
