Delete an element from the Set by passing its value : Approach : In this method, an element is deleted by using the erase function and calling it with the value of Read more →
Given N coins initially all tails up (let say represented by ‘0’) and a number of queries Q. There are two types of queries. Update: 1) Given indices of a range [L, Read more →
You are given two boxes. The first box is empty while in the second, there are 3 piles of coins. Whenever you choose a pile of X coins (x>=1) from the second Read more →
Given a dictionary, repeat elements K times where K is key of dictionary. Examples : Input : test_dict = {4 : 5, 7 : 2, 9 : 6, 10 : 4} Output Read more →
Introduction: Compliance testing is defined as providing some verification due to these systems, processes, products, and operational outputs conform to laws and regulations. It is also known as regulation testing and also Read more →
Given a 2D Grid consisting of integer values the task is to check whether there is a cycle in the grid or not . A valid cycle in the grid should follow Read more →
Given two natural numbers N1 and N2.The task is to find the maximum possible sum after swapping of a single digit between two given natural numbers. Examples : Input : N1=123 N2=998 Read more →
You are given an integer array which is sorted in non-decreasing order. Build and return an integer array result with the same length as the integer array such that result[i] is equal Read more →
Given an array of N elements. You have to partition the array into two non-empty subarrays such that every number in the right subarray is strictly greater than every number in the Read more →
Given a disconnected graph G with N vertices and M edges and cost[] for all the vertices, the task is to add edges to G to make it connected and to add Read more →