28 June | Sum of elements between k1’th and k2’th smallest elements Given an array $A[ ]$ of $N$ positive integers and two positive integers $K1$ and $K2$. Find the sum of all elements between $K_...
June | 2022 | Leetcoding Challenge
21 June | 1642. Furthest Building You Can Reach You are given an integer array heights representing the heights of buildings, some bricks, and some ladders. You start your journey from building 0...
Week 2 | Grind 169 | Blind 75
1. Ransom Note Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise. Each letter in magazine can only be ...
Week 1 | Grind 169 | Blind 75
1. Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution...
Algorithm II | Study Plan | Leetcode
Day 1 | Binary Search 34. Find First and Last Position of Element in Sorted Array Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given ...
DSA Part 8: Dynamic Programming
Dynamic Programming is an optimization over plain recursion. In this, we re-use the solutions of subproblems for overlapping subproblems Two types are 1. Memoization - Top Down No of dimenst...
DSA Part 7: Searching & Sorting Algos
Sorting Algo Merge Sort Merge sort is a divide-and-conquer, comparison-based sorting algorithm. Conceptually, a merge sort works as follows: Divide the unsorted list into n sublists, each co...
Interview Prep: React
Explain and demonstrate [useState, useRef, useEffect, useMemo, useContext]. Is JS statically or dynamically typed language? Is Babel a compiler or a transpiler ? What does webpack do in a ...
Interview Prep: HTML, CSS & JS
HTML What is DOM ? Methods of Document Object ? HTML form and diff types of input and enctype attribute ? What are HTML Entities ? How to optimize website assets loading? Use of ifram...
Interview Prep: DevOps
’ Explain HEAD. Explain tags. Explain staging area. Explain git cherry-pick, git reflog, git bisect, git stash, git diff and git blame. –soft vs –mixed –hard reset. Pull vs fetch. Di...
Interview Prep: DBMS
Explain ACID. SQL vs NoSQL. Types of sql commands(ddl, dml, dcl, tcl) Explain inner, outer, left, right, cross and full join. When to use sql(or nosql) database ? Vertical or horizonta...
DSA Part 6: Arrays
Array is a continuos block of memory. We use an ‘index’ to access $i^{th}$ element of the array. In most of the programming languages indexing start from 0. Time complexity Operati...
Intro to ML Part 8: Preprocessing
1 2 MathJax.Hub.Queue(["Typeset", MathJax.Hub]); } } init_mathjax(); </script> <!-- End of mathjax configuration --></head> Data Preproces...
Intro to ML Part 2: List, Tuple & Dict
1 2 MathJax.Hub.Queue(["Typeset", MathJax.Hub]); } } init_mathjax(); </script> <!-- End of mathjax configuration --></head> List¶ ...
DSA Part 5: Recursion
Recursion Recursion is a process of a function calling itself. It can cause segmentation fault/stack overflow if the base case is implemented poorly. It is based on PMI(Principle of Mathematical I...
DSA Part 4: Pointers & Preprocessors
Pointers Need for pointers To store the address of some variables from the symbol table. This address can be retrieved using & and is stored in hexadecimal form. Eg : 0x7ffc40fe4b94 We...
Intro to ML Part 1: Introduction
1 2 MathJax.Hub.Queue(["Typeset", MathJax.Hub]); } } init_mathjax(); </script> <!-- End of mathjax configuration --></head> Installing Ana...
DSA Part 3: Bit Manipulation
Binary Numbers A binary number is a number that is represented by using two digits only, usually 0 and 1. In C++, there are either 32-bit or 64-bit numbers an are stored as Binary represen...
Google Codejam 2022
Qualification Round Problem A Description A secret team of programmers is plotting to disrupt the programming language landscape and bring punched cards back by introducing a new language called...
Intro To Stock Market
Myths about stock markets Investing is just like gambling. Eventually, one day the market will crash and you will lose all your gains as well as the principal amount. Source: Google Financ...