Home
Priyanshu Tiwari
Cancel

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

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 | March | Leetcode

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

# 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 &lt;= i &lt;= 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...

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&lt;int&gt; getCumulativeSum(vector&lt;int...

# InfyTQ Certification Round | Infosys | 2022

All of the submissions for InfyTQ Certification Round, February 2022. All the submissions are posted once the examination was already over. Morning Shift : 8 Feb Problem 1 Consider the foll...

# Codeforces Contests 2022

February Round #770 (Div. 2) Reverse and Concatenate You are given a string s of length n and a number k. Let’s denote by rev(s) the reversed string s (i.e. rev(s)=snsn−1…s1). You can apply one ...

# Data Structure I | Study Plan | Leetcode

Day 1 | Array 217. Contains Duplicate Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Practice clas...

# Algorithm I | Study Plan | Leetcode

Day 1 | Binary Search 704. Binary Search Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, th...

Trending Tags