Best time to buy and sell stock

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 →

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 →

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started