Instruction stringlengths 261 35k | Response stringclasses 1
value |
|---|---|
For this Question: Naruto and Sasuke are on a S- Rank mission. Now They got bored and thought of competing in a race against each other in a horizontal plane. They decides a common spot C at which both of them will try to reach. Whoever reaches first wins the race, both of them run at the same speed.
Given initial pos... | Compilable |
For this Question: Naruto and Sasuke are on a S- Rank mission. Now They got bored and thought of competing in a race against each other in a horizontal plane. They decides a common spot C at which both of them will try to reach. Whoever reaches first wins the race, both of them run at the same speed.
Given initial pos... | Compilable |
For this Question: Naruto and Sasuke are on a S- Rank mission. Now They got bored and thought of competing in a race against each other in a horizontal plane. They decides a common spot C at which both of them will try to reach. Whoever reaches first wins the race, both of them run at the same speed.
Given initial pos... | Compilable |
For this Question: Naruto and Sasuke are on a S- Rank mission. Now They got bored and thought of competing in a race against each other in a horizontal plane. They decides a common spot C at which both of them will try to reach. Whoever reaches first wins the race, both of them run at the same speed.
Given initial pos... | Compilable |
For this Question: There is a door at Newton School that can be used only by one person at a time i. e either a person can enter from the door or exit but no two people can do it simultaneously. If two people going in the opposite direction arrived at the door at the same time then these 3 cases should be considered:-
... | Compilable |
For this Question: There is a door at Newton School that can be used only by one person at a time i. e either a person can enter from the door or exit but no two people can do it simultaneously. If two people going in the opposite direction arrived at the door at the same time then these 3 cases should be considered:-
... | Compilable |
For this Question: There is a door at Newton School that can be used only by one person at a time i. e either a person can enter from the door or exit but no two people can do it simultaneously. If two people going in the opposite direction arrived at the door at the same time then these 3 cases should be considered:-
... | Compilable |
For this Question: You are given an integer A and a floating point number B, upto exactly two decimal places. Compute their product, truncate its fractional part, and print the result as an integer.Since this will be a functional problem, you don't have to take input. You just have to complete the function solve() that... | Compilable |
For this Question: Given an array A of size N (N is always even), you need to find exactly (N/2) numbers where each number represents the pair-wise sum of consecutive elements of the array A.
In simple terms print (A[1]+A[2]), (A[3]+A[4]), ..., (A[N-1]+A[N]).The first line of the input contains the number of test ca... | Compilable |
For this Question: Given an array A of size N (N is always even), you need to find exactly (N/2) numbers where each number represents the pair-wise sum of consecutive elements of the array A.
In simple terms print (A[1]+A[2]), (A[3]+A[4]), ..., (A[N-1]+A[N]).The first line of the input contains the number of test ca... | Compilable |
For this Question: Given an array A of size N (N is always even), you need to find exactly (N/2) numbers where each number represents the pair-wise sum of consecutive elements of the array A.
In simple terms print (A[1]+A[2]), (A[3]+A[4]), ..., (A[N-1]+A[N]).The first line of the input contains the number of test ca... | Compilable |
For this Question: You are given three distinct positive integers, A, B and C, in the input. Your task is to find their median.
The median of a set of integers is the number at the middle position if they are arranged in ascending order.The input consists of a single line containing three integers A, B and C.
<b... | Compilable |
For this Question: You are given three distinct positive integers, A, B and C, in the input. Your task is to find their median.
The median of a set of integers is the number at the middle position if they are arranged in ascending order.The input consists of a single line containing three integers A, B and C.
<b... | Compilable |
For this Question: You are given three distinct positive integers, A, B and C, in the input. Your task is to find their median.
The median of a set of integers is the number at the middle position if they are arranged in ascending order.The input consists of a single line containing three integers A, B and C.
<b... | Compilable |
For this Question: Given three numbers A, B, C. The triplet is said to be a "good triplet" if the sum of any two numbers is equal to the third number.
Print 1 if the triplet is good, else print 0.Three integers are given as input. a, b, c.
<b>Constraints</b>
1 ≤ a, b, c ≤ 10<sup>4</sup>Print 1 if three numbe... | Compilable |
For this Question: You are given a grid having N*M elements. Find the index of the row (1-base indexing) which has the maximum sum of elements.
Note: if more than two rows have the same sum of elements, then return the smallest index.The first line of the input contains two integers N and M.
The next N lines each con... | Compilable |
For this Question: You are given a grid having N*M elements. Find the index of the row (1-base indexing) which has the maximum sum of elements.
Note: if more than two rows have the same sum of elements, then return the smallest index.The first line of the input contains two integers N and M.
The next N lines each con... | Compilable |
For this Question: A conveyor belt has parcels that must be shipped from one point to another within D days.
The i-th parcel on the conveyor belt has a weight of weights[i]. Each day, we load the ship with parcels on the conveyor belt (in the order given). We may not load more weight than the maximum weight capacit... | Compilable |
For this Question: A conveyor belt has parcels that must be shipped from one point to another within D days.
The i-th parcel on the conveyor belt has a weight of weights[i]. Each day, we load the ship with parcels on the conveyor belt (in the order given). We may not load more weight than the maximum weight capacit... | Compilable |
For this Question: A conveyor belt has parcels that must be shipped from one point to another within D days.
The i-th parcel on the conveyor belt has a weight of weights[i]. Each day, we load the ship with parcels on the conveyor belt (in the order given). We may not load more weight than the maximum weight capacit... | Compilable |
For this Question: You are given a binary string S of length N. Suppose there is an integer K (1 <= K <= N). You can perform the following operation on the string any number of times (possible zero):
Select a substring in S whose size is <b>at least</b> K i. e, R − L + 1 >= K must be followed and flip this substring... | Compilable |
For this Question: You are given a binary string S of length N. Suppose there is an integer K (1 <= K <= N). You can perform the following operation on the string any number of times (possible zero):
Select a substring in S whose size is <b>at least</b> K i. e, R − L + 1 >= K must be followed and flip this substring... | Compilable |
For this Question: Sara is trying a new magic trick on you, The magic trick goes in 6 steps:-
1. Think of a number X(don't tell Sara)
2. Add A(Given by Sara) to it.
3. Double the sum in your mind.
4. Add an even number B(Given by Sara) to it.
5. Half the amount
6. Subtract the initial number which you had taken ... | Compilable |
For this Question: Sara is trying a new magic trick on you, The magic trick goes in 6 steps:-
1. Think of a number X(don't tell Sara)
2. Add A(Given by Sara) to it.
3. Double the sum in your mind.
4. Add an even number B(Given by Sara) to it.
5. Half the amount
6. Subtract the initial number which you had taken ... | Compilable |
For this Question: Sara is trying a new magic trick on you, The magic trick goes in 6 steps:-
1. Think of a number X(don't tell Sara)
2. Add A(Given by Sara) to it.
3. Double the sum in your mind.
4. Add an even number B(Given by Sara) to it.
5. Half the amount
6. Subtract the initial number which you had taken ... | Compilable |
For this Question: We have N+M balls, each of which has an integer written on it.
It is known that:
1) The numbers written on the N of the balls are even.
2) The numbers written on the M of the balls are odd.
Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the number... | Compilable |
For this Question: You are given an array A of size N, and you are also given a sum. You need to find if two numbers in A exists such that their sum is equal to the given sum. If yes, print 1, else print 0.The first line contains N denoting the size of the array A and target sum. The second line contains N elements of ... | Compilable |
For this Question: You are given an array A of size N, and you are also given a sum. You need to find if two numbers in A exists such that their sum is equal to the given sum. If yes, print 1, else print 0.The first line contains N denoting the size of the array A and target sum. The second line contains N elements of ... | Compilable |
For this Question: You are given an array A of size N, and you are also given a sum. You need to find if two numbers in A exists such that their sum is equal to the given sum. If yes, print 1, else print 0.The first line contains N denoting the size of the array A and target sum. The second line contains N elements of ... | Compilable |
For this Question: You have to complete <code>printName</code> function
<ol>
<li>Takes 2 arguments which are EventEmitter object , event name </li>
<li>Using the <code>EventEmitter</code> object you need to register an eventListener for <code>personEvent</code> event which takes a callback function. </li>
<l... | Compilable |
For this Question: Implement the function <code>floor</code>, which should take a number which can be a float(decimal)
and return its result as an integer with floor function applied to it (Use JS In built functions)Function will take a float as inputFunction will return a numberconsole.log(floor(1.99)) // prints 1
... | Compilable |
For this Question: Implement the function <code>floor</code>, which should take a number which can be a float(decimal)
and return its result as an integer with floor function applied to it (Use JS In built functions)Function will take a float as inputFunction will return a numberconsole.log(floor(1.99)) // prints 1
... | Compilable |
For this Question: Find factorial of a given number N.
<b>Note: </b>
The Factorial of a number is the product of an integer and all the integers below it;
e.g. factorial four ( 4! ) is equal to 24 (4*3*2*1).<b>User Task</b>
Since this is a functional problem, you don't have to worry about the input. You just have ... | Compilable |
For this Question: Find factorial of a given number N.
<b>Note: </b>
The Factorial of a number is the product of an integer and all the integers below it;
e.g. factorial four ( 4! ) is equal to 24 (4*3*2*1).<b>User Task</b>
Since this is a functional problem, you don't have to worry about the input. You just have ... | Compilable |
For this Question: Find factorial of a given number N.
<b>Note: </b>
The Factorial of a number is the product of an integer and all the integers below it;
e.g. factorial four ( 4! ) is equal to 24 (4*3*2*1).<b>User Task</b>
Since this is a functional problem, you don't have to worry about the input. You just have ... | Compilable |
For this Question: Given two strings a and b consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “act” and “tac” are... | Compilable |
For this Question: Given two strings a and b consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “act” and “tac” are... | Compilable |
For this Question: Given two strings a and b consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “act” and “tac” are... | Compilable |
For this Question: Given two strings a and b consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “act” and “tac” are... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: You are given an equation:
T<sub>n</sub> = 2*n + (n + 1)<sup>2</sup> - (n<sup>2</sup> + 4)
Your task is to find S<sub>n</sub>:
S<sub>n</sub> = T<sub>1</sub> + T<sub>2</sub> + T<sub>3</sub> +. .. . + T<sub>n</sub>User task:
Since this is a functional problem, you don’t have to worry about the in... | Compilable |
For this Question: You are given an equation:
T<sub>n</sub> = 2*n + (n + 1)<sup>2</sup> - (n<sup>2</sup> + 4)
Your task is to find S<sub>n</sub>:
S<sub>n</sub> = T<sub>1</sub> + T<sub>2</sub> + T<sub>3</sub> +. .. . + T<sub>n</sub>User task:
Since this is a functional problem, you don’t have to worry about the in... | Compilable |
For this Question: You are given an equation:
T<sub>n</sub> = 2*n + (n + 1)<sup>2</sup> - (n<sup>2</sup> + 4)
Your task is to find S<sub>n</sub>:
S<sub>n</sub> = T<sub>1</sub> + T<sub>2</sub> + T<sub>3</sub> +. .. . + T<sub>n</sub>User task:
Since this is a functional problem, you don’t have to worry about the in... | Compilable |
For this Question: You are given an equation:
T<sub>n</sub> = 2*n + (n + 1)<sup>2</sup> - (n<sup>2</sup> + 4)
Your task is to find S<sub>n</sub>:
S<sub>n</sub> = T<sub>1</sub> + T<sub>2</sub> + T<sub>3</sub> +. .. . + T<sub>n</sub>User task:
Since this is a functional problem, you don’t have to worry about the in... | Compilable |
For this Question: Given a number N, you need to count the integers which are multiple of N between 1 to 100. Return the count.<b>User task:</b>
Since this is a functional problem you don't have to worry about the input. You just have to complete the function <b>countMultiples()</b> which contains N as a parameter.
... | Compilable |
For this Question: Everyone has heard of palindromes, right! A palindrome is a string that remains the same if reversed.
Let's define a new term, Dalindrome.
A Dalindrome is a string whose atleast one of the substrings is a palindrome.
Given a string, find whether it's a Dalindrome.The only line of input contains a... | Compilable |
For this Question: Everyone has heard of palindromes, right! A palindrome is a string that remains the same if reversed.
Let's define a new term, Dalindrome.
A Dalindrome is a string whose atleast one of the substrings is a palindrome.
Given a string, find whether it's a Dalindrome.The only line of input contains a... | Compilable |
For this Question: Everyone has heard of palindromes, right! A palindrome is a string that remains the same if reversed.
Let's define a new term, Dalindrome.
A Dalindrome is a string whose atleast one of the substrings is a palindrome.
Given a string, find whether it's a Dalindrome.The only line of input contains a... | Compilable |
For this Question: Given an integer K and an array height[] of size N, where height[i] denotes the height of the ith tree in a forest. The task is to make a cut of height X from the ground such that at max K units wood is collected. Find the minimum value of X
<b>If you make a cut of height X from the ground then ever... | Compilable |
For this Question: Given an integer K and an array height[] of size N, where height[i] denotes the height of the ith tree in a forest. The task is to make a cut of height X from the ground such that at max K units wood is collected. Find the minimum value of X
<b>If you make a cut of height X from the ground then ever... | Compilable |
For this Question: Given an integer K and an array height[] of size N, where height[i] denotes the height of the ith tree in a forest. The task is to make a cut of height X from the ground such that at max K units wood is collected. Find the minimum value of X
<b>If you make a cut of height X from the ground then ever... | Compilable |
For this Question: Given four numbers A, B, C, D. Find the maximum number of pairs that can be made.
(each pair consist of two distinct numbers). Each number can be used only once.Four integers are given as input. a, b, c, d
<b>Constraints</b>
1 ≤ a, b, c, d ≤ 10<sup>4</sup>Output should print the maximum nu... | Compilable |
For this Question: Quadratic probing is a collision handling technique in hashing. Quadratic probing says that whenever a collision occurs, search for i^2 position.
In this question, we'll learn how to fill up the hash table using Quadratic probing technique. You are given hash table size which you'll use to insert ... | Compilable |
For this Question: Quadratic probing is a collision handling technique in hashing. Quadratic probing says that whenever a collision occurs, search for i^2 position.
In this question, we'll learn how to fill up the hash table using Quadratic probing technique. You are given hash table size which you'll use to insert ... | Compilable |
For this Question: Quadratic probing is a collision handling technique in hashing. Quadratic probing says that whenever a collision occurs, search for i^2 position.
In this question, we'll learn how to fill up the hash table using Quadratic probing technique. You are given hash table size which you'll use to insert ... | Compilable |
For this Question: Given a number N, find out whether it is divisible by 3.The first and the only line of input contains the number N.
<b>Constraints</b>
1 <= N <= 10^100000 (N may consist of 100001 digits).
<b>No usual datatype will be able to input such large number.</b>Output "Yes" if the number is divisibl... | Compilable |
For this Question: Given a number N, find out whether it is divisible by 3.The first and the only line of input contains the number N.
<b>Constraints</b>
1 <= N <= 10^100000 (N may consist of 100001 digits).
<b>No usual datatype will be able to input such large number.</b>Output "Yes" if the number is divisibl... | Compilable |
For this Question: Given a number N, find out whether it is divisible by 3.The first and the only line of input contains the number N.
<b>Constraints</b>
1 <= N <= 10^100000 (N may consist of 100001 digits).
<b>No usual datatype will be able to input such large number.</b>Output "Yes" if the number is divisibl... | Compilable |
For this Question: Given an array nums that represents a permutation of integers from 1 to n. We are going to construct a binary search tree (BST) by inserting the elements of nums in order into an initially empty BST. Find the number of different ways to reorder nums so that the constructed BST is identical to that fo... | Compilable |
For this Question: Given an array nums that represents a permutation of integers from 1 to n. We are going to construct a binary search tree (BST) by inserting the elements of nums in order into an initially empty BST. Find the number of different ways to reorder nums so that the constructed BST is identical to that fo... | Compilable |
For this Question: You are given Q queries. Each query consists of a single number N. You can perform any one of the 2 operations in a single move:
1: If we take 2 integers a and b where, N=a*b, (a and b are not equal to 1), then we can change N=max(a,b)
2: Decrease the value of N by 1 .
For each query determine th... | Compilable |
For this Question: You are given Q queries. Each query consists of a single number N. You can perform any one of the 2 operations in a single move:
1: If we take 2 integers a and b where, N=a*b, (a and b are not equal to 1), then we can change N=max(a,b)
2: Decrease the value of N by 1 .
For each query determine th... | Compilable |
For this Question: An array of 5 string is given where each string contains 2 characters, Now you have to sort these strings, like in a dictionary.Input contains 5 strings of length 2 separated by spaces.
String contains only uppercase English letters.Print the sorted array.INPUT :
AS KF ER DD JK
OUTPUT :
AS DD... | Compilable |
For this Question: An array of 5 string is given where each string contains 2 characters, Now you have to sort these strings, like in a dictionary.Input contains 5 strings of length 2 separated by spaces.
String contains only uppercase English letters.Print the sorted array.INPUT :
AS KF ER DD JK
OUTPUT :
AS DD... | Compilable |
For this Question: An array of 5 string is given where each string contains 2 characters, Now you have to sort these strings, like in a dictionary.Input contains 5 strings of length 2 separated by spaces.
String contains only uppercase English letters.Print the sorted array.INPUT :
AS KF ER DD JK
OUTPUT :
AS DD... | Compilable |
For this Question: An array of 5 string is given where each string contains 2 characters, Now you have to sort these strings, like in a dictionary.Input contains 5 strings of length 2 separated by spaces.
String contains only uppercase English letters.Print the sorted array.INPUT :
AS KF ER DD JK
OUTPUT :
AS DD... | Compilable |
For this Question: Given an array A[] of size N containing non-negative integers. You have to move all 0's to the end of array while maintaining the relative order of the non-zero elements.
Note:
You must do this in-place without making a copy of the array.
Minimize the total number of operations.The first line of... | Compilable |
For this Question: Given an array A[] of size N containing non-negative integers. You have to move all 0's to the end of array while maintaining the relative order of the non-zero elements.
Note:
You must do this in-place without making a copy of the array.
Minimize the total number of operations.The first line of... | Compilable |
For this Question: Myra has x red colour balls and y blue colour balls. She wants to distribute these balls into identical groups without any balls left. What is the largest number of groups she can make?
Identical groups mean there are equal number of same coloured balls in each group.A single line containing two... | Compilable |
For this Question: Myra has x red colour balls and y blue colour balls. She wants to distribute these balls into identical groups without any balls left. What is the largest number of groups she can make?
Identical groups mean there are equal number of same coloured balls in each group.A single line containing two... | Compilable |
For this Question: Myra has x red colour balls and y blue colour balls. She wants to distribute these balls into identical groups without any balls left. What is the largest number of groups she can make?
Identical groups mean there are equal number of same coloured balls in each group.A single line containing two... | Compilable |
For this Question: You must be familiar with various types of operators. One of the most commonly used operators in any language are increment and decrement operators. Given two numbers X and Y. Your task is to print the value of X decremented by 1 and value of Y after incremented by 1.The first line of the input conta... | Compilable |
For this Question: You must be familiar with various types of operators. One of the most commonly used operators in any language are increment and decrement operators. Given two numbers X and Y. Your task is to print the value of X decremented by 1 and value of Y after incremented by 1.The first line of the input conta... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: For a given number N, Consider a table of N X N in which elements at the intersection of ith row and jth column are the product of i and j, i. e i x j.
Also given a positive integer X. Your task is to count the number of elements in the table that contain the integer X.<b>User Task:</b>
Since this... | Compilable |
For this Question: There are n people in a circle, numbered from 1 to n, each of whom always tells the truth or always lies.
Each person i makes a claim of the form: “the number of truth-tellers in this circle is between a<sub>i</sub> and b<sub>i</sub>, inclusive.”
Compute the maximum number of people who could be te... | Compilable |
For this Question: There are n people in a circle, numbered from 1 to n, each of whom always tells the truth or always lies.
Each person i makes a claim of the form: “the number of truth-tellers in this circle is between a<sub>i</sub> and b<sub>i</sub>, inclusive.”
Compute the maximum number of people who could be te... | Compilable |
For this Question: There are n people in a circle, numbered from 1 to n, each of whom always tells the truth or always lies.
Each person i makes a claim of the form: “the number of truth-tellers in this circle is between a<sub>i</sub> and b<sub>i</sub>, inclusive.”
Compute the maximum number of people who could be te... | Compilable |
For this Question: You are given a number n. You need to find the count of digits in n.The first line of input contains T denoting the number of test cases. Each testcase contains one line of input containing n.
For Python, Language Just Completes the function.
<b>Constraints:</b>
1 ≤ T ≤ 100
1 ≤ n ≤ ... | Compilable |
For this Question: You are given a number n. You need to find the count of digits in n.The first line of input contains T denoting the number of test cases. Each testcase contains one line of input containing n.
For Python, Language Just Completes the function.
<b>Constraints:</b>
1 ≤ T ≤ 100
1 ≤ n ≤ ... | Compilable |
For this Question: You are given a number n. You need to find the count of digits in n.The first line of input contains T denoting the number of test cases. Each testcase contains one line of input containing n.
For Python, Language Just Completes the function.
<b>Constraints:</b>
1 ≤ T ≤ 100
1 ≤ n ≤ ... | Compilable |
For this Question: Given a number, you task is to reverse its digits. If the reversed number contains 0s in the beginning, you must remove them as well.First line consists of a single integer denoting n.
Constraint:-
1<=size of n<=100Output is a single line containing reversed number n.Sample Input
123445
Sampl... | Compilable |
For this Question: Given a number, you task is to reverse its digits. If the reversed number contains 0s in the beginning, you must remove them as well.First line consists of a single integer denoting n.
Constraint:-
1<=size of n<=100Output is a single line containing reversed number n.Sample Input
123445
Sampl... | Compilable |
For this Question: Given a number, you task is to reverse its digits. If the reversed number contains 0s in the beginning, you must remove them as well.First line consists of a single integer denoting n.
Constraint:-
1<=size of n<=100Output is a single line containing reversed number n.Sample Input
123445
Sampl... | Compilable |
For this Question: Given an unsorted integer array having distinct integers, find a pair with the given sum in it.
First element of pair > second element of pairFirst line of input contains a single integer N, next line contains N space separated integers depicting the values of array and third line consist target sum... | Compilable |
For this Question: Given an unsorted integer array having distinct integers, find a pair with the given sum in it.
First element of pair > second element of pairFirst line of input contains a single integer N, next line contains N space separated integers depicting the values of array and third line consist target sum... | Compilable |
For this Question: Given an unsorted integer array having distinct integers, find a pair with the given sum in it.
First element of pair > second element of pairFirst line of input contains a single integer N, next line contains N space separated integers depicting the values of array and third line consist target sum... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
For this Question: For a certain event, the value of a favorable outcome is A and the total outcome is B. If the probability of this event is represented by p/q where p and q are coprime then what will be the value of p+q.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just... | Compilable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.