Instruction stringlengths 261 35k | Response stringclasses 1
value |
|---|---|
For this Question: Given four integers a, b, c, and d. Find the value of a<sup>(b<sup>(c<sup>d</sup>)</sup>)</sup> modulo 1000000007.
(Fact: 0<sup>0</sup> = 1)The first and the only line of input contains 4 integers a, b, c, and d.
Constraints
1 <= a, b, c, d <= 12Output a single integer, the answer modulo 10000... | Compilable |
For this Question: Given four integers a, b, c, and d. Find the value of a<sup>(b<sup>(c<sup>d</sup>)</sup>)</sup> modulo 1000000007.
(Fact: 0<sup>0</sup> = 1)The first and the only line of input contains 4 integers a, b, c, and d.
Constraints
1 <= a, b, c, d <= 12Output a single integer, the answer modulo 10000... | Compilable |
For this Question: You need to make an order counter to keep track of the total number of orders received.
Complete the function <code> generateOrder() </code> which returns a <code>function func()</code>. This function <code>func</code> should maintain a <code> count (initially 0)</code>. Every time <code>func</cod... | Compilable |
For this Question: Given a Deque and Q queries. The task is to perform some operation on Deque according to the queries as described in input:
Note:-if deque is empty than pop operation will do nothing, and -1 will be printed as a front and rear element of queue if it is empty.User task:
Since this will be a functi... | 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: Emily was playing with triplets. She was excited to find out how many triples of non-negative integers (a, b, c) satisfy a+b+c≤S and a×b×c≤T, where S & T are non-negative integers.The input line contains S, and T separated by space.
<b>Constraints</b>
0≤S≤100
0≤T≤10000
S and T are i... | Compilable |
For this Question: Given an integer n holding some random value, your task is to assign value 10 to the given integer.User task:
Since this is a functional problem you don't have to worry about the input. You just have to complete the function <b>Assignment_Operator()</b>, which takes no parameter.
<b>Constraints:<... | Compilable |
For this Question: You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array, your task is to print the minimum size of the set so that at least half of the integers of the array are removed.The first line contains n the size of the array and the ... | Compilable |
For this Question: You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array, your task is to print the minimum size of the set so that at least half of the integers of the array are removed.The first line contains n the size of the array and the ... | Compilable |
For this Question: You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array, your task is to print the minimum size of the set so that at least half of the integers of the array are removed.The first line contains n the size of the array and the ... | Compilable |
For this Question: You are given an integer N of at least 100. Print the last two digits of N. Strictly speaking, print the tens and one's digits of N in this order.The input consists of an integer.
N
<b>Constraints</b>
100≤N≤999
N is an integer.Print the answer.<b>Sample Input 1</b>
254
<b>Sample Output... | Compilable |
For this Question: Given a string S consisting of characters 'A' or 'B' only, you need to find the maximum length of substring consisting of character 'A' only.The first and the only line of input contains the string S.
Constraints
1 <= |S| <= 100000
S consists of characters 'A' or 'B' only.Output a single integer... | Compilable |
For this Question: Given a string S consisting of characters 'A' or 'B' only, you need to find the maximum length of substring consisting of character 'A' only.The first and the only line of input contains the string S.
Constraints
1 <= |S| <= 100000
S consists of characters 'A' or 'B' only.Output a single integer... | Compilable |
For this Question: Given a string S consisting of characters 'A' or 'B' only, you need to find the maximum length of substring consisting of character 'A' only.The first and the only line of input contains the string S.
Constraints
1 <= |S| <= 100000
S consists of characters 'A' or 'B' only.Output a single integer... | Compilable |
For this Question: Tono loves to do shopping. Today, she went to the market where there are N different types of products. She wants to buy exactly K of them at the minimum cost. Although she is super smart, she wants to check your smartness as well. Can you tell her the minimum cost required to buy exactly K products ... | Compilable |
For this Question: Tono loves to do shopping. Today, she went to the market where there are N different types of products. She wants to buy exactly K of them at the minimum cost. Although she is super smart, she wants to check your smartness as well. Can you tell her the minimum cost required to buy exactly K products ... | Compilable |
For this Question: Tono loves to do shopping. Today, she went to the market where there are N different types of products. She wants to buy exactly K of them at the minimum cost. Although she is super smart, she wants to check your smartness as well. Can you tell her the minimum cost required to buy exactly K products ... | Compilable |
For this Question: Alita has two a sequence of numbers x1, x2,…..xn. She has to go fight a battle with these sequence of numbers. But these numbers are not correct for the battle. She has to convert these numbers to another sequence of numbers y1, y2,…….yn. Alita is busy preparing for the battle so she needs your help.... | Compilable |
For this Question: Alita has two a sequence of numbers x1, x2,…..xn. She has to go fight a battle with these sequence of numbers. But these numbers are not correct for the battle. She has to convert these numbers to another sequence of numbers y1, y2,…….yn. Alita is busy preparing for the battle so she needs your help.... | Compilable |
For this Question: Alita has two a sequence of numbers x1, x2,…..xn. She has to go fight a battle with these sequence of numbers. But these numbers are not correct for the battle. She has to convert these numbers to another sequence of numbers y1, y2,…….yn. Alita is busy preparing for the battle so she needs your help.... | Compilable |
For this Question: Given a singly linked list and an element K, your task is to insert the element at the tail of the linked list.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>addElement()</b> that takes head node and the integer K as... | Compilable |
For this Question: Given a singly linked list and an element K, your task is to insert the element at the tail of the linked list.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>addElement()</b> that takes head node and the integer K as... | Compilable |
For this Question: Given an array of N integers, your task is to calculate the sum of bit difference in all pairs which can be formed.The first line of input contains a single integer N, the second line of input contains N space separated integers depicting values of the array.
Constraints:-
1 <= N <= 100000
0 <= ... | Compilable |
For this Question: Given an array of N integers, your task is to calculate the sum of bit difference in all pairs which can be formed.The first line of input contains a single integer N, the second line of input contains N space separated integers depicting values of the array.
Constraints:-
1 <= N <= 100000
0 <= ... | Compilable |
For this Question: Given an array of N integers, your task is to calculate the sum of bit difference in all pairs which can be formed.The first line of input contains a single integer N, the second line of input contains N space separated integers depicting values of the array.
Constraints:-
1 <= N <= 100000
0 <= ... | Compilable |
For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 ≤ N ≤ 10<sup>5</sup>
0 ≤ A<sub>i</sub> ≤ 10<sup>18</sup>
All values i... | Compilable |
For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 ≤ N ≤ 10<sup>5</sup>
0 ≤ A<sub>i</sub> ≤ 10<sup>18</sup>
All values i... | Compilable |
For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 ≤ N ≤ 10<sup>5</sup>
0 ≤ A<sub>i</sub> ≤ 10<sup>18</sup>
All values i... | Compilable |
For this Question: Given an array of size N consisting of only 0's and 1's, your task is to find the maximum number of consecutive's 1's you can get by flipping at most M 0'sFirst line of input contains two space separated integers denoting values of N and M, next line contains N space separated integer denoting the va... | Compilable |
For this Question: Given an array of size N consisting of only 0's and 1's, your task is to find the maximum number of consecutive's 1's you can get by flipping at most M 0'sFirst line of input contains two space separated integers denoting values of N and M, next line contains N space separated integer denoting the va... | Compilable |
For this Question: Given an array of size N consisting of only 0's and 1's, your task is to find the maximum number of consecutive's 1's you can get by flipping at most M 0'sFirst line of input contains two space separated integers denoting values of N and M, next line contains N space separated integer denoting the va... | Compilable |
For this Question: You are given two arrays - value and frequency both containing N elements.
There is also a third array C which is currently empty. Then you perform N insertion operation in the array. For ith operation you insert value[i] to the end of the array frequency[i] number of times.
Finally you have to tel... | Compilable |
For this Question: You are given two arrays - value and frequency both containing N elements.
There is also a third array C which is currently empty. Then you perform N insertion operation in the array. For ith operation you insert value[i] to the end of the array frequency[i] number of times.
Finally you have to tel... | Compilable |
For this Question: You are given two arrays - value and frequency both containing N elements.
There is also a third array C which is currently empty. Then you perform N insertion operation in the array. For ith operation you insert value[i] to the end of the array frequency[i] number of times.
Finally you have to tel... | Compilable |
For this Question: Given an integer N, your task is to represent the given integer as a binary number.Input contains a single integer containing the value of N.
Constraints:-
0 <= N <= 1000000000Print a string containing the binary representation of the given integer.Sample Input:-
9
Sample Output:-
1001
Sa... | Compilable |
For this Question: Given an integer N, your task is to represent the given integer as a binary number.Input contains a single integer containing the value of N.
Constraints:-
0 <= N <= 1000000000Print a string containing the binary representation of the given integer.Sample Input:-
9
Sample Output:-
1001
Sa... | Compilable |
For this Question: Given an integer N, your task is to represent the given integer as a binary number.Input contains a single integer containing the value of N.
Constraints:-
0 <= N <= 1000000000Print a string containing the binary representation of the given integer.Sample Input:-
9
Sample Output:-
1001
Sa... | Compilable |
For this Question: To enter Todo's amusement park, there are M counters. Total N people want to enter the amusement park, each of whom will line up in front of one of the counters. Any counter worker gets angry if the number of people lining up in front of him is at least 2 more than the number of people lining up in f... | Compilable |
For this Question: To enter Todo's amusement park, there are M counters. Total N people want to enter the amusement park, each of whom will line up in front of one of the counters. Any counter worker gets angry if the number of people lining up in front of him is at least 2 more than the number of people lining up in f... | Compilable |
For this Question: To enter Todo's amusement park, there are M counters. Total N people want to enter the amusement park, each of whom will line up in front of one of the counters. Any counter worker gets angry if the number of people lining up in front of him is at least 2 more than the number of people lining up in f... | Compilable |
For this Question: Rick has got a huge candy bag. The bag contains a total of O orange candies, A apple candies, and U candies with an unknown flavor (can be orange or apple as well).
Now Morty wants to know the maximum number of candies that can be drawn from the bag blindfolded such that no more than X orange and Y... | Compilable |
For this Question: Rick has got a huge candy bag. The bag contains a total of O orange candies, A apple candies, and U candies with an unknown flavor (can be orange or apple as well).
Now Morty wants to know the maximum number of candies that can be drawn from the bag blindfolded such that no more than X orange and Y... | Compilable |
For this Question: Rick has got a huge candy bag. The bag contains a total of O orange candies, A apple candies, and U candies with an unknown flavor (can be orange or apple as well).
Now Morty wants to know the maximum number of candies that can be drawn from the bag blindfolded such that no more than X orange and Y... | Compilable |
For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | Compilable |
For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | Compilable |
For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | 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: Given an array of size 2*N in the form as [x1, x2.. xn, y1, y2,. yn], your task is to shuffle the array in the form given as [x1, y1, x2, y2,. xN, yN]First line of input contains a single integer N. Next line of input contains 2*N space separated integers depicting the values of the array.
Constra... | Compilable |
For this Question: Given an array of size 2*N in the form as [x1, x2.. xn, y1, y2,. yn], your task is to shuffle the array in the form given as [x1, y1, x2, y2,. xN, yN]First line of input contains a single integer N. Next line of input contains 2*N space separated integers depicting the values of the array.
Constra... | Compilable |
For this Question: Given an array of size 2*N in the form as [x1, x2.. xn, y1, y2,. yn], your task is to shuffle the array in the form given as [x1, y1, x2, y2,. xN, yN]First line of input contains a single integer N. Next line of input contains 2*N space separated integers depicting the values of the array.
Constra... | Compilable |
For this Question: Given N and K, find the lexicographically smallest string of length N using only the first K lowercase letters of the alphabet such that each letter is used at least once and no two adjacent characters are equal.
If such a string doesn't exist, print -1.The first line of input contains a single i... | Compilable |
For this Question: Given N and K, find the lexicographically smallest string of length N using only the first K lowercase letters of the alphabet such that each letter is used at least once and no two adjacent characters are equal.
If such a string doesn't exist, print -1.The first line of input contains a single i... | Compilable |
For this Question: Given N and K, find the lexicographically smallest string of length N using only the first K lowercase letters of the alphabet such that each letter is used at least once and no two adjacent characters are equal.
If such a string doesn't exist, print -1.The first line of input contains a single i... | Compilable |
For this Question: Given two arrays A and B. Given Q queries each having a positive integer i denoting an index of the array A. For each query, your task is to find number of elements less than or equal to A(i) in the array B.The first line of the input consists of an integer N.
The second and third line of each test... | Compilable |
For this Question: Given two arrays A and B. Given Q queries each having a positive integer i denoting an index of the array A. For each query, your task is to find number of elements less than or equal to A(i) in the array B.The first line of the input consists of an integer N.
The second and third line of each test... | Compilable |
For this Question: The students of Newton School threw a grand party to celebrate their hard work and achievements. They danced and sang the night away, enjoying delicious food and creating memories that would last a lifetime.
There are N guests in the party and N-1 relationships are given. The guests are numbered 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: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | Compilable |
For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | Compilable |
For this Question: Jerry has recently learned about BODMAS rule, so he is highly curious about brackets. He is currently aware of 3 kinds of brackets, "()", "{}", and "[]".
A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" ... | Compilable |
For this Question: They say friendship is greater than love. Why not play the famous game "FLAMES".
The rules are super simple. Given two strings (all lowercase), remove all the letters that are common to both the strings from both the strings. You cannot erase a character in first string whichever corresponding same ... | Compilable |
For this Question: They say friendship is greater than love. Why not play the famous game "FLAMES".
The rules are super simple. Given two strings (all lowercase), remove all the letters that are common to both the strings from both the strings. You cannot erase a character in first string whichever corresponding same ... | Compilable |
For this Question: They say friendship is greater than love. Why not play the famous game "FLAMES".
The rules are super simple. Given two strings (all lowercase), remove all the letters that are common to both the strings from both the strings. You cannot erase a character in first string whichever corresponding same ... | Compilable |
For this Question: Given an sorted array <b>Arr[]</b> of size <b>N</b>, containing both <b>negative</b> and <b>positive</b> integers, you need to print the squared sorted output.
<b>Note</b> Try using two pointer approachThe first line of input contains T, denoting the number of test cases. Each testcase contains 2 ... | Compilable |
For this Question: Given an sorted array <b>Arr[]</b> of size <b>N</b>, containing both <b>negative</b> and <b>positive</b> integers, you need to print the squared sorted output.
<b>Note</b> Try using two pointer approachThe first line of input contains T, denoting the number of test cases. Each testcase contains 2 ... | Compilable |
For this Question: A 2n digits number is said to be lucky if sum of n most significant digits is equal to sum of n least significant digits.
Given a number find out if the number is lucky or not?First line contains n.
Next line contains a number of 2n digits.
<b>Constraints</b>
1 ≤ n ≤ 10<sup>5</sup>
Number co... | Compilable |
For this Question: Sara selects two different numbers from the range 1 to 50 and noted their sum as N. However later she Forgets which numbers she selected and now wants to know the total number of possible combinations she can have.<b>User Task:</b>
Since this will be a functional problem, you don't have to take inpu... | Compilable |
For this Question: Sara selects two different numbers from the range 1 to 50 and noted their sum as N. However later she Forgets which numbers she selected and now wants to know the total number of possible combinations she can have.<b>User Task:</b>
Since this will be a functional problem, you don't have to take inpu... | Compilable |
For this Question: Sara selects two different numbers from the range 1 to 50 and noted their sum as N. However later she Forgets which numbers she selected and now wants to know the total number of possible combinations she can have.<b>User Task:</b>
Since this will be a functional problem, you don't have to take inpu... | Compilable |
For this Question: Sara selects two different numbers from the range 1 to 50 and noted their sum as N. However later she Forgets which numbers she selected and now wants to know the total number of possible combinations she can have.<b>User Task:</b>
Since this will be a functional problem, you don't have to take inpu... | Compilable |
For this Question: Saurabh has a paper of size N*M and some horizontal and vertical lines in the form of arrays. Saurabh wants to know the maximum area which is trapped inside the lines.
Note:- Consider the boundary of the paper to be vertical and horizontal lines. Also consider 0 indexingThe first line of input con... | Compilable |
For this Question: Saurabh has a paper of size N*M and some horizontal and vertical lines in the form of arrays. Saurabh wants to know the maximum area which is trapped inside the lines.
Note:- Consider the boundary of the paper to be vertical and horizontal lines. Also consider 0 indexingThe first line of input con... | Compilable |
For this Question: Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.Each test case consists of two lines. The first line of each test case is N and S, where N is the size of the array and S is the sum. The second line of each test case contains N s... | Compilable |
For this Question: Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.Each test case consists of two lines. The first line of each test case is N and S, where N is the size of the array and S is the sum. The second line of each test case contains N s... | Compilable |
For this Question: Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.Each test case consists of two lines. The first line of each test case is N and S, where N is the size of the array and S is the sum. The second line of each test case contains N s... | Compilable |
For this Question: Given a string S. You can rearrange its letters in any way you want. You have to the find the maximum number of substrings in S which are equal to "abcda" after rearrangement.First line of input contains a single string S.
Constraints:
1 <= |S| <= 100000
String contains lowercase english letters... | Compilable |
For this Question: Given a string S. You can rearrange its letters in any way you want. You have to the find the maximum number of substrings in S which are equal to "abcda" after rearrangement.First line of input contains a single string S.
Constraints:
1 <= |S| <= 100000
String contains lowercase english letters... | Compilable |
For this Question: Given a string S. You can rearrange its letters in any way you want. You have to the find the maximum number of substrings in S which are equal to "abcda" after rearrangement.First line of input contains a single string S.
Constraints:
1 <= |S| <= 100000
String contains lowercase english letters... | Compilable |
For this Question: On an infinite plane, a robot initially stands at (0, 0) and faces north. Note that:
:> The north direction is the positive direction of the y- axis.
:> The south direction is the negative direction of the y- axis.
:> The east direction is the positive direction of the x- axis.
:> The west dire... | Compilable |
For this Question: Given an integer array <strong>arr[]</strong> of size <strong>N</strong> and an element <strong>X</strong>. The task is to find and print the indices of the given element if it is present in array if not then print “<strong>Not found</strong>” without quotes.
<strong>Note</strong>: The elements m... | Compilable |
For this Question: Given an integer array <strong>arr[]</strong> of size <strong>N</strong> and an element <strong>X</strong>. The task is to find and print the indices of the given element if it is present in array if not then print “<strong>Not found</strong>” without quotes.
<strong>Note</strong>: The elements m... | Compilable |
For this Question: Given an integer array <strong>arr[]</strong> of size <strong>N</strong> and an element <strong>X</strong>. The task is to find and print the indices of the given element if it is present in array if not then print “<strong>Not found</strong>” without quotes.
<strong>Note</strong>: The elements m... | Compilable |
For this Question: Sansa has discovered Theon is at Winterfell. Ramsay is forcing him to apologize to her for supposedly killing her younger brothers. But Sansa will accept the apology string S if it satisfies the following conditions for a given value of N:
<li> String S should have exactly <b>N distinct substrings</... | Compilable |
For this Question: Sansa has discovered Theon is at Winterfell. Ramsay is forcing him to apologize to her for supposedly killing her younger brothers. But Sansa will accept the apology string S if it satisfies the following conditions for a given value of N:
<li> String S should have exactly <b>N distinct substrings</... | Compilable |
For this Question: Sansa has discovered Theon is at Winterfell. Ramsay is forcing him to apologize to her for supposedly killing her younger brothers. But Sansa will accept the apology string S if it satisfies the following conditions for a given value of N:
<li> String S should have exactly <b>N distinct substrings</... | Compilable |
For this Question: Sara is fond of ice cream initially she had N ice creams with her. If Sara eats exactly half of the ice cream she has in a day and the remaining icecreams get tripled each night. How many ice creams does Sara have at the end of D-days?
<b>Note:- </b>
Take the floor value while dividing by 2.<b>User... | Compilable |
For this Question: Sara is fond of ice cream initially she had N ice creams with her. If Sara eats exactly half of the ice cream she has in a day and the remaining icecreams get tripled each night. How many ice creams does Sara have at the end of D-days?
<b>Note:- </b>
Take the floor value while dividing by 2.<b>User... | Compilable |
For this Question: Sara is fond of ice cream initially she had N ice creams with her. If Sara eats exactly half of the ice cream she has in a day and the remaining icecreams get tripled each night. How many ice creams does Sara have at the end of D-days?
<b>Note:- </b>
Take the floor value while dividing by 2.<b>User... | Compilable |
For this Question: Sara is fond of ice cream initially she had N ice creams with her. If Sara eats exactly half of the ice cream she has in a day and the remaining icecreams get tripled each night. How many ice creams does Sara have at the end of D-days?
<b>Note:- </b>
Take the floor value while dividing by 2.<b>User... | Compilable |
For this Question: Alice's power is currently known to be an integer X. It is also known that her power doubles every second. For example, if Alice's power was currently 20, then after 2 seconds her power would have grown to 80.
Your task is to find out Alice's power after N seconds.The input consists of a single li... | Compilable |
For this Question: Alice's power is currently known to be an integer X. It is also known that her power doubles every second. For example, if Alice's power was currently 20, then after 2 seconds her power would have grown to 80.
Your task is to find out Alice's power after N seconds.The input consists of a single li... | Compilable |
For this Question: Alice's power is currently known to be an integer X. It is also known that her power doubles every second. For example, if Alice's power was currently 20, then after 2 seconds her power would have grown to 80.
Your task is to find out Alice's power after N seconds.The input consists of a single li... | Compilable |
For this Question: Given a queue of integers and N queries. Your the task is to perform these operations:-
enqueue:-this operation will add an element to your current queue.
dequeue:-this operation will delete the element from the starting of the queue
displayfront:-this operation will print the element presented at... | Compilable |
For this Question: You are given an array A of size N. You have to print the maximum in every <b>K-sized subarray</b> from the left to the right in the array A.
More formally, you have to print N - K + 1 integers X<sub>1</sub>, X<sub>2</sub>, ..., X<sub>N-K+1</sub> such that X<sub>i</sub> (1 <= i <= N - K + 1) is the ... | Compilable |
For this Question: You are given an array A of size N. You have to print the maximum in every <b>K-sized subarray</b> from the left to the right in the array A.
More formally, you have to print N - K + 1 integers X<sub>1</sub>, X<sub>2</sub>, ..., X<sub>N-K+1</sub> such that X<sub>i</sub> (1 <= i <= N - K + 1) is the ... | Compilable |
For this Question: You are given an array A of size N. You have to print the maximum in every <b>K-sized subarray</b> from the left to the right in the array A.
More formally, you have to print N - K + 1 integers X<sub>1</sub>, X<sub>2</sub>, ..., X<sub>N-K+1</sub> such that X<sub>i</sub> (1 <= i <= N - K + 1) is the ... | Compilable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.