Jun 13Linked-List Cycle LeetCode 141Problem Statement Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to…Leetcode2 min read

Jun 12Stack and it’s ImplementationImplementation of stack using Arrays and Linked-list a in C++. Stack is a linear data structure used to store data. It is very simple and very similar to Linked-list. Stack operates on the LIFO principle. A stack is also considered an Abstract Data Type(ADT) with two main principle operations, Push …Stack Data Structure5 min read

Jun 9Kadane’s Algorithm(Dynamic Programming) Wondering why Kadane’s Algorithm is used? You are given a one dimensional array that may contain both positive and negative integers, find the sum of contiguous subarray of numbers which has the largest sum This can be done using, 1. Brute Force Approach Time Complexity : O(nlogn) Auxiliary Space : O(1) We…Kadanes Algorithm2 min read

Dec 24, 2021How to Set-Up Virtual Environment for PythonWhy Virtual Environment??? Let’s say you want to work on a big project which needs the use of a specific version of Python, lets say Python3 and you might also in future need many other libraries and packages for the same project. So, you might install those directly on your…Virtual Environment3 min read

Dec 15, 2021Finest points from ‘The Defining Decade’ by Meg Jay Part-11.Tired of lying in the sunshine, staying home to watch the rain You are young and life is long, and there is time to kill today And then one day you find, ten years has got behind you No one told you when to run, you missed the starting gun. …Twenty Something4 min read

Nov 4, 2021Delete a node at any position in a Linked ListObjective : To delete a node at any given position in a Linked List. Example : INPUT Linked list : 1 2 3 4 5 Enter the position of the value to be deleted : 3 OUTPUT Linked List after deletion : 1 2 4 5 Visual Representation : …2 min read

Sep 7, 2021Finally here with the Knowing-Doing Gap!Why is it very important for us to be mindful of the concept of the knowing-doing gap? Do you do what you know you should do? Will know just do? At times or in fact most of the time we know it all! But does only knowing to mean you…Self Awareness3 min read

Dec 22, 2020Diagonal Difference Hacker RankProblem Statement Given a square matrix[NxN], calculate the absolute difference between the sums of its diagonals. Sample Input 3 11 2 4 4 5 6 10 8 -12 Sample Output 15 Diagonal(Primary Diagonal) 11 5 -12 Anti-Diagonal(Secondary Diagonal) 4 5 1 The absolute difference of sum of Diagonal and Anti-Diagonal elements Diagonal Sum = 11+5+(-12) = 4 Anti-Diagonal Sum = 4+5+10 = 19 Diagonal Difference : |4-19| = 15Hackerrank2 min read