Given two positive integers N and K. Find the minimum number of digits that can be removed from the number N such that after removals the number is divisible by 10K or print -1 if it is impossible. Examples: Input : N = 10904025, K = 2 Output : 3 Explanation : We can […]

## Ceiling in right side for every element in an array

Given an array of integers, find the closest greater element for every element. If there is no greater element then print -1 Examples: Input : arr[] = {10, 5, 11, 10, 20, 12}Output : 10 10 12 12 -1 -1 Input : arr[] = {50, 20, 200, 100, 30}Output : 100 30 -1 -1 -1 […]

## Python | Convert a list of multiple integers into a single integer

Given a list of integers, write a Python program to convert the given list into a single integer. Examples: Input : [1, 2, 3] Output : 123 Input : [55, 32, 890] Output : 5532890 There are multiple approaches possible to convert the given list into a single integer. Let’s see each one […]

## Finding Mean, Median, Mode in Python without libraries

In this article, we will learn how to calculate Mean, Median and Mode with Python without using external libraries. Mean : The mean is the average of all numbers and is sometimes called the arithmetic mean. This code calculates Mean or Average of a list containing numbers: n_num = [1, 2, 3, 4, 5] […]

## TCS NQT 2018 (Recruitment Exam)

I am from “Institute of Engineering and Management, Kolkata”. Round 1: TCS conducted a National Qualifier Test (NQT) as the first round of recruitment process this year. There was no concept of Campus Recruitment had happened this year. They fixed two specific dates for this NQT exam that was 2nd September 2018 and 3rd September 2018. […]

## Ways to write N as sum of two or more positive integers | Set-2

Given a number N, the task is to find the number of ways N can be partitioned, i.e. the number of ways that N can be expressed as a sum of positive integers. Note: N should also be considered itself a way to express it as a sum of positive integers.Examples: Input: N = 5Output: […]