Gblog GeeksforGeeks True Geek Tournament – 7 Days Marathon to Earn the ‘True Geek’ Title!
Do you remember the childhood days, when cricket was the major reason for living to you and how excited you used to be for that… Read More
Prerequisite – Fenwick TreeWe know that to answer range sum queries on a 1-D array efficiently, binary indexed tree (or Fenwick Tree) is the best… Read More
Any and All are two built ins provided in python used for successive And/Or. Any Returns true if any of the items is True. It… Read More
Amazon recently visited our campus for hiring interns for 6 month internship. Round 1: Online Test The round-1 was an online test of 90 minutes.… Read More
Indexing is a way to optimize the performance of a database by minimizing the number of disk accesses required when a query is processed. It… Read More
Pre-requisite: BIT(Binary Indexed Tree or Fenwick Tree), 2D BITGiven a 2D plane, respond to Q queries, each of the following type:  Insert x y –… Read More
Add two fraction a/b and c/d and print answer in simplest form.Examples :   Input: 1/2 + 3/2 Output: 2/1 Input: 1/3 + 3/9 Output: 2/3… Read More
Some of the string methods are covered in below sets. String Methods Part- 1 String Methods Part- 2 More methods are discussed in this article… Read More
Partial functions allow us to fix a certain number of arguments of a function and generate a new function. Example: from functools import partial   … Read More
Change gender of string i.e toggle all the gender-specific words in the input string. Examples: Input: “she is my sister” Output: “he is my brother”.… Read More
Global variables are the one that is defined and declared outside a function and we need to use them inside a function.   Python3 #… Read More
Generating Random Sorted Arrays We store the random array elements in an array and then sort it and print it. // A C++ Program to… Read More
Some of the string methods are covered in the set 3 below String Methods Part- 1 More methods are discussed in this article 1. len()… Read More
Ternary operators are also known as conditional expressions are operators that evaluate something based on a condition being true or false. It was added to… Read More
Given a small integer n, print all the n’th roots of unity up to 6 significant digits. We basically need to find all roots of… Read More
Generating Random Directed Unweighted Graphs Since this is a graph, the test data generation plan doesn’t guarantee that a cycle gets formed or not. The… Read More