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...

# DSA Part 2: Mathematics

Number System Types of number Type Value Natural Numbers $N=1,2,3,4, \ldots$ Prime Number $P=2,3,5,7,11,13,17, \ldots$ ...

# DSA Part 1: Introduction

Asymptotic Notations Time taken by a program is always +ve. Input provided is also always +ve. Hence, analysis of an algorrithm is done always in the first quadrant. Big-O Notation Big-Ω Notati...

# April | 2022 | Leetcoding Challenge

Week 1 1 March | 344. Reverse String Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the input array in-place with O...

# Google Kickstart 2022

Round A Problem A Description Ada gives John a positive integer N. She challenges him to construct a new number (without leading zeros), that is a multiple of 9, by inserting exactly one digit (...

# Project Euler

1. Multiples of 3 and 5 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or ...

# Weekly and Biweekly Contests | October | Leetcode

Weekly Contest 315 2441. Largest Positive Integer That Exists With Its Negative Given an integer array nums that does not contain any zeros, find the largest positive integer k such that -k also ...

# Weekly and Biweekly Contests | March | Leetcode

Biweekly Contest 73 6024. Most Frequent Number Following Key In an Array You are given a 0-indexed integer array nums. You are also given an integer key, which is present in nums. For every uniq...

# Weekly and Biweekly Contests | June | Leetcode

Biweekly Contest 81 2315. Count Asterisks You are given a string s, where every two consecutive vertical bars $’ ’$ are grouped into a pair. In other words, the 1st and 2nd $...

# Weekly and Biweekly Contests | July | Leetcode

Biweekly Contest 82 2331. Evaluate Boolean Binary Tree You are given the root of a full binary tree with the following properties: Leaf nodes have either the value 0 or 1, where 0 represents ...

# March | 2022 | Leetcoding Challenge

Week 1 1 March | 338. Counting Bits Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1’s in the binary representation of i...

# Programming Skills I | Study Plan | Leetcode

Day 1 | Array 1523. Count Odd Numbers in an Interval Range Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive) Practice class Solu...

# Dynamic Programming I | Study Plan | Leetcode

Day 1 | Array 509. Fibonacci Number The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starti...

# Google Hashcode 2022

Practice Round Problem statement You are opening a small pizzeria. In fact, your pizzeria is so small that you decided to offer only one type of pizza. Now you need to decide what ingredients to ...

# NLTH | Wipro | 2022

All the submissions are posted once the examination was already over. 22 Feb Problem 1 “Easy Math” is an online math tutorial platform for kids. In the tutorial, there is a multiplication assess...

# BST | 450 DSA | Love Babbar

Search a node in BST Given a Binary Search Tree and a node value X, find if the node with value X is present in the BST or not. GFG The idea is to use the fact that the given tree is a BS...

# Binary Tree | 450 DSA | Love Babbar

Level order traversal Given a binary tree, find its level order traversal. Level order traversal of a tree is breadth-first traversal for the tree. GFG Create a queue, insert the root nod...

# Atcoder Contests 2022

February ABC 239 A - Horizon Assuming that the horizon seen from a place x meters above the ground is x(12800000+x) meters away, find how many meters away the horizon seen from a place H meters ...

# Linked List | 450 DSA | Love Babbar

Reverse a string The task is to complete the function reverseList() with head reference as the only argument and should return new head after reversing the list. GFG class Solution { pub...

# Array | 6 Months DSA Sheet | Work@Tech

Cumulative Sum The cumulative sum of an array at index i is defined as the sum of all elements of the array from index 0 to index i. Practice vector<int> getCumulativeSum(vector<int...