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 →
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 →
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 →
Some useful linux commands every developer needs.
Please do not be afraid. This is !(a shell programming) Apparently a developer's job is not only developing applications. It is also expected of a developer to test the code, create and maintain the environment for the packages and installable files. Furthermore deploy it in either cloud or in client's setup and obviously take care... Continue Reading →
A simple way to fetch emails in python
In today's world, where technology has made its way into almost everything. Countries across the globe are slowly adapting to the changing atmosphere and bringing in tech at all levels of administration. So now, it has become a lot easier for us to get the information that we are looking for quickly and securely. Ranging... Continue Reading →
Deep copy and shallow copy in Python
Deep down, I happen to be very shallow.- Pat PaulsonThis is different than ctrl+C right?Definitely so. If we were asked to copy one object from one place to another place, I guess we might have sought help from ctrl+c and ctrl+v. However, when we ask(programmatically) python to do it; it is done in a different... Continue Reading →
