Instruction stringlengths 261 35k | Response stringclasses 1
value |
|---|---|
For this Question: Power Rangers have to trap a evil spirit monster into a cuboid shape box with dimensions A*B*C, where A, B and C are positive integers. The volume of the box should be exactly X cubic units (that is A*B*C should be equal to X). To allow minimum evil aura to leak from the box the surface area of the b... | Compilable |
For this Question: Power Rangers have to trap a evil spirit monster into a cuboid shape box with dimensions A*B*C, where A, B and C are positive integers. The volume of the box should be exactly X cubic units (that is A*B*C should be equal to X). To allow minimum evil aura to leak from the box the surface area of the b... | Compilable |
For this Question: Let us create a table 'STORY' from existing table 'POSTS' which will contain the information about the stories users will create on LinkedIn. This table 'story' will contain the fields (USERNAME, DATETIME_CREATED, PHOTO) of the table 'posts'
( USE ONLY UPPERCASE LETTERS FOR CODE)
<schema>[{'name':... | 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 A[], of size N containing positive integers. You need to print the elements of an array in increasing order.The first line of the input denotes the number of test cases 'T'. The first line of the test case is the size of the array and the second line consists of array elements.
For ... | Compilable |
For this Question: Given an array A[], of size N containing positive integers. You need to print the elements of an array in increasing order.The first line of the input denotes the number of test cases 'T'. The first line of the test case is the size of the array and the second line consists of array elements.
For ... | Compilable |
For this Question: Given an array A[], of size N containing positive integers. You need to print the elements of an array in increasing order.The first line of the input denotes the number of test cases 'T'. The first line of the test case is the size of the array and the second line consists of array elements.
For ... | Compilable |
For this Question: Given an array A[], of size N containing positive integers. You need to print the elements of an array in increasing order.The first line of the input denotes the number of test cases 'T'. The first line of the test case is the size of the array and the second line consists of array elements.
For ... | 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: Take input from standard input while you do not get 0 as an input. Print all the inputs separated by space. It is guaranteed that the number of integers are less than 100000.The input will contain a series of integers in one line each. Input should be taken while you have not get a 0 as an input.
... | Compilable |
For this Question: Take input from standard input while you do not get 0 as an input. Print all the inputs separated by space. It is guaranteed that the number of integers are less than 100000.The input will contain a series of integers in one line each. Input should be taken while you have not get a 0 as an input.
... | Compilable |
For this Question: Take input from standard input while you do not get 0 as an input. Print all the inputs separated by space. It is guaranteed that the number of integers are less than 100000.The input will contain a series of integers in one line each. Input should be taken while you have not get a 0 as an input.
... | Compilable |
For this Question: Given a binary string S. The task is to count the number of substrings that start and end with 1. For example, if the input string is “00100101”, then there are three substrings “1001”, “100101” and “101”.User Task:
Since this will be a functional problem, you don't have to take input. You just have... | Compilable |
For this Question: Given a binary string S. The task is to count the number of substrings that start and end with 1. For example, if the input string is “00100101”, then there are three substrings “1001”, “100101” and “101”.User Task:
Since this will be a functional problem, you don't have to take input. You just have... | Compilable |
For this Question: Given an n x n matrix and a number x, find whether given element present in matrix or not, every row and column is sorted in increasing order. The designed algorithm should have linear time complexity.first line contain two element n and x.
next n line contain n space separated integer i. e. element... | Compilable |
For this Question: Given an n x n matrix and a number x, find whether given element present in matrix or not, every row and column is sorted in increasing order. The designed algorithm should have linear time complexity.first line contain two element n and x.
next n line contain n space separated integer i. e. element... | Compilable |
For this Question: Given the length, breadth, and height of a cuboid. Your task is to calculate its Perimeter.
Note:- Formula for the perimeter of the cuboid is 4(Length + Breadth + height)<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... | Compilable |
For this Question: Given the length, breadth, and height of a cuboid. Your task is to calculate its Perimeter.
Note:- Formula for the perimeter of the cuboid is 4(Length + Breadth + height)<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... | Compilable |
For this Question: Given an array A and an integer K. Find the maximum for each and every contiguous subarray of size K.
Problem asked in Amazon, Flipkart.The first line of each test case contains a single integer N denoting the size of array and the size of subarray K. The second line contains N space-separated i... | Compilable |
For this Question: Given an array A and an integer K. Find the maximum for each and every contiguous subarray of size K.
Problem asked in Amazon, Flipkart.The first line of each test case contains a single integer N denoting the size of array and the size of subarray K. The second line contains N space-separated i... | Compilable |
For this Question: Given an array A and an integer K. Find the maximum for each and every contiguous subarray of size K.
Problem asked in Amazon, Flipkart.The first line of each test case contains a single integer N denoting the size of array and the size of subarray K. The second line contains N space-separated i... | 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: 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: Joffrey has issued orders for Stark's execution. Now, you are trying to predict if Stark will survive or not. You are confident that Stark's survival depends on the N<sup>th</sup> fibonacci number's parity. If it is odd you will predict that Stark lives but if it is even you will predict that Stark d... | Compilable |
For this Question: Joffrey has issued orders for Stark's execution. Now, you are trying to predict if Stark will survive or not. You are confident that Stark's survival depends on the N<sup>th</sup> fibonacci number's parity. If it is odd you will predict that Stark lives but if it is even you will predict that Stark d... | Compilable |
For this Question: Joffrey has issued orders for Stark's execution. Now, you are trying to predict if Stark will survive or not. You are confident that Stark's survival depends on the N<sup>th</sup> fibonacci number's parity. If it is odd you will predict that Stark lives but if it is even you will predict that Stark d... | Compilable |
For this Question: After sitting idle in home for around 2 months, Jiraya has finally come up with a super interesting problem on arrays (or maybe!).
You are given an array A of N integers. You need to choose an index i from 1 to N (inclusive) and divide this array into 2 parts, then find the maximum sum of contiguou... | Compilable |
For this Question: After sitting idle in home for around 2 months, Jiraya has finally come up with a super interesting problem on arrays (or maybe!).
You are given an array A of N integers. You need to choose an index i from 1 to N (inclusive) and divide this array into 2 parts, then find the maximum sum of contiguou... | Compilable |
For this Question: After sitting idle in home for around 2 months, Jiraya has finally come up with a super interesting problem on arrays (or maybe!).
You are given an array A of N integers. You need to choose an index i from 1 to N (inclusive) and divide this array into 2 parts, then find the maximum sum of contiguou... | Compilable |
For this Question: Given two strings A and B, check if the string A is a sub-string of string B or not.First line of input contains a string A, the second line of the input contains the string B.
Constraints:-
1 < = |A| < = |B| < = 1000
Note:- String will only contain lowercase english letters.Print "Yes" if the... | Compilable |
For this Question: Given two strings A and B, check if the string A is a sub-string of string B or not.First line of input contains a string A, the second line of the input contains the string B.
Constraints:-
1 < = |A| < = |B| < = 1000
Note:- String will only contain lowercase english letters.Print "Yes" if the... | Compilable |
For this Question: Given two strings A and B, check if the string A is a sub-string of string B or not.First line of input contains a string A, the second line of the input contains the string B.
Constraints:-
1 < = |A| < = |B| < = 1000
Note:- String will only contain lowercase english letters.Print "Yes" if the... | Compilable |
For this Question: You will be given a <code>list of employees</code> with their information in a <code>JSON format as an argument</code>. Your task is to implement a JavaScript function, <code>performEmployeeOperations</code>, that performs the following tasks:
<ol>
<li>Find the <code>employee with the highest sal... | Compilable |
For this Question: You are given resistance value of N resistors. Find the net resistance of the system when all of these N resistors are connected in parallel.
If there are three resistors A1, A2, A3, when they are connected in parallel, the net resistance will be 1/((1/A1) + (1/A2) + (1/A3))
Since this number c... | Compilable |
For this Question: You are given resistance value of N resistors. Find the net resistance of the system when all of these N resistors are connected in parallel.
If there are three resistors A1, A2, A3, when they are connected in parallel, the net resistance will be 1/((1/A1) + (1/A2) + (1/A3))
Since this number c... | Compilable |
For this Question: You are given resistance value of N resistors. Find the net resistance of the system when all of these N resistors are connected in parallel.
If there are three resistors A1, A2, A3, when they are connected in parallel, the net resistance will be 1/((1/A1) + (1/A2) + (1/A3))
Since this number c... | Compilable |
For this Question: Rick wants to give Morty a chapo (a super awesome treat :P).
The only condition for Morty to get a chapo is that he should be able to reach Rick's place. Both Rick and Morty live on the number line at integer points A and B respectively. There are N types of moves M<sub>1</sub>, M<sub>2</sub>,. ,... | Compilable |
For this Question: Rick wants to give Morty a chapo (a super awesome treat :P).
The only condition for Morty to get a chapo is that he should be able to reach Rick's place. Both Rick and Morty live on the number line at integer points A and B respectively. There are N types of moves M<sub>1</sub>, M<sub>2</sub>,. ,... | Compilable |
For this Question: Rick wants to give Morty a chapo (a super awesome treat :P).
The only condition for Morty to get a chapo is that he should be able to reach Rick's place. Both Rick and Morty live on the number line at integer points A and B respectively. There are N types of moves M<sub>1</sub>, M<sub>2</sub>,. ,... | Compilable |
For this Question: There are N robots standing in a row. Ultron wants to delegate a task of difficulty X to two of them. Each robot has its own ability, A[i] for the i<sup>th</sup> robot from the left. The task can only be completed if the sum of the abilities of the two robots is exactly equal to X. Ultron wants to fi... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: Spring has come, and the management of the AvtoBus bus fleet has given the order to replace winter tires with summer tires on all buses. You own a small bus service business and you have just received an order to replace n tires. You know that the bus fleet owns two types of buses: with two axles (th... | Compilable |
For this Question: Given two positive integers N and M. Your task is to print first <b>M Special GCD numbers</b> which are greater than N.
<b>M Special GCD numbers</b> : First M numbers which are greater than N and whose GCD with N is equal to the smallest prime factor of N.User Task:
Since this is a functional probl... | Compilable |
For this Question: Given two positive integers N and M. Your task is to print first <b>M Special GCD numbers</b> which are greater than N.
<b>M Special GCD numbers</b> : First M numbers which are greater than N and whose GCD with N is equal to the smallest prime factor of N.User Task:
Since this is a functional probl... | Compilable |
For this Question: Given two positive integers N and M. Your task is to print first <b>M Special GCD numbers</b> which are greater than N.
<b>M Special GCD numbers</b> : First M numbers which are greater than N and whose GCD with N is equal to the smallest prime factor of N.User Task:
Since this is a functional probl... | Compilable |
For this Question: Given two positive integers N and M. Your task is to print first <b>M Special GCD numbers</b> which are greater than N.
<b>M Special GCD numbers</b> : First M numbers which are greater than N and whose GCD with N is equal to the smallest prime factor of N.User Task:
Since this is a functional probl... | Compilable |
For this Question: A typical Google search url looks like <b>https://www.google.com/search?q=newtonschool</b>, where the user input <b>newtonschool</b> is passed as variable via the query parameter <b>q=</b>.
You have been provided employee details. Complete the function <b>getEmployeeDetails</b> as shown. Given a ... | Compilable |
For this Question: Your friend Bob is standing in a line of N students and he got bored, so he called you and gave you a puzzle. He told you that there are no less than x students standing in front of him and no more than y students standing behind him. He asked you to find the number of different positions he could be... | 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: Mahi hates the number 7.
We are interested in integers without the digit 7 in both decimal and octal. How many such integers are there between 1 and N (inclusive)?Input is given from Standard Input in the following format:
N
<b>Constraints</b>
1≤N≤10^5
N is an integer.Print an integ... | Compilable |
For this Question: You are given an integer n, you have to print a Inverted half pyramid of size n.The first line contains a single Integer n.
<b>Constraints</b>
1 ≤ n ≤ 100Print inverted half pyramid of size n.Sample 1:
Input:
3
Output:
1 2 3
1 2
1
Explanation:
Inverted half pyramid of size 3., I ha... | Compilable |
For this Question: Gian and Suneo want their heights to be equal so they asked Doraemon's help. Doraemon gave a big light to both of them but the both big lights have different speed of magnifying. Let's assume the big light given to Gian can increase height of a person by v1 m/s and that of Suneo's big light is v2 m/s... | Compilable |
For this Question: Gian and Suneo want their heights to be equal so they asked Doraemon's help. Doraemon gave a big light to both of them but the both big lights have different speed of magnifying. Let's assume the big light given to Gian can increase height of a person by v1 m/s and that of Suneo's big light is v2 m/s... | Compilable |
For this Question: Gian and Suneo want their heights to be equal so they asked Doraemon's help. Doraemon gave a big light to both of them but the both big lights have different speed of magnifying. Let's assume the big light given to Gian can increase height of a person by v1 m/s and that of Suneo's big light is v2 m/s... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: Given an array of N integers containing only 0 or 1. You can do the following operations on the array:
<ul><li>swap elements at two indices</li><li>choose one index and change its value from 0 to 1 or vice-versa.</li></ul>
You have to do the minimum number of the above operations such that the fina... | Compilable |
For this Question: For a number N we have N! unique permutations. <b>A permutation is a sequence of integers from 1 to N of length N containing each number exactly once.</b>
For a positive integer X, <b>X! = 1 * 2 * 3 *...* X-1 * X</b>
Your task is to find the Kth smallest permutation when all possible permutations o... | Compilable |
For this Question: For a number N we have N! unique permutations. <b>A permutation is a sequence of integers from 1 to N of length N containing each number exactly once.</b>
For a positive integer X, <b>X! = 1 * 2 * 3 *...* X-1 * X</b>
Your task is to find the Kth smallest permutation when all possible permutations o... | Compilable |
For this Question: Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have the same frequency, sort them in decreasing order.The first line of the input contains n ( length of num )
The second line contains the array num.
<b>Constraints</b>
... | Compilable |
For this Question: Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have the same frequency, sort them in decreasing order.The first line of the input contains n ( length of num )
The second line contains the array num.
<b>Constraints</b>
... | Compilable |
For this Question: Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have the same frequency, sort them in decreasing order.The first line of the input contains n ( length of num )
The second line contains the array num.
<b>Constraints</b>
... | Compilable |
For this Question: Given a string s, find the minimum number of changes required to it so that all substrings of the string become distinct.
Note: length of string is atmost 26.The first line contains an integer T, number of test cases. For each testcase there is only one line containing s atmost 26 characters.
1... | Compilable |
For this Question: Given a string s, find the minimum number of changes required to it so that all substrings of the string become distinct.
Note: length of string is atmost 26.The first line contains an integer T, number of test cases. For each testcase there is only one line containing s atmost 26 characters.
1... | Compilable |
For this Question: Given a string s, find the minimum number of changes required to it so that all substrings of the string become distinct.
Note: length of string is atmost 26.The first line contains an integer T, number of test cases. For each testcase there is only one line containing s atmost 26 characters.
1... | Compilable |
For this Question: A boy lost the password of his super locker. He remembers the number of digits N as well as the sum S of all the digits of his password. He know that his password is the largest number of N digits that can be possible with given sum S. As he is busy doing his homework, help him retrieving his passwor... | Compilable |
For this Question: A boy lost the password of his super locker. He remembers the number of digits N as well as the sum S of all the digits of his password. He know that his password is the largest number of N digits that can be possible with given sum S. As he is busy doing his homework, help him retrieving his passwor... | Compilable |
For this Question: A boy lost the password of his super locker. He remembers the number of digits N as well as the sum S of all the digits of his password. He know that his password is the largest number of N digits that can be possible with given sum S. As he is busy doing his homework, help him retrieving his passwor... | Compilable |
For this Question: Walter white is considered very intelligent person. He has a problem to solve. As he is suffering from cancer, can you help him solve it?
Given two integer arrays C and S of length c and s respectively. Index i of array S can be considered good if a subarray of length c can be formed starting from... | Compilable |
For this Question: An array A of size N is called magical if:
1. Each element of the array is a positive integer not exceeding M, that is, 1 ≤ A<sub>i</sub> ≤ M for each i.
2. For each i such that 1 ≤ i ≤ N, define f(i) = A<sub>1</sub> | A<sub>2</sub> | ... A<sub>i</sub>, where x | y denotes the bitwise OR of x and... | Compilable |
For this Question: Given an array of N integers, You have to find the maximum product of two integers.The first line of input contains a single integer N. The next line of input contains N space separated integers.
Constraints:-
2 <= N <= 100000
-10000 <= Arr[i] <= 10000Print the maximum product of two elements.Sa... | 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: Write a program to print Five stars ('*') <b><i>vertically</i></b> and 5 <b><i>horizontally</i></b>
There will be two functions:
<ul>
<li>verticalFive(): Print stars in vertical order</li>
<li>horizontalFive(): Print stars in horizontal order</l>
</ul><b>User Task:</b>
Your task is to complet... | Compilable |
For this Question: Write a program to print Five stars ('*') <b><i>vertically</i></b> and 5 <b><i>horizontally</i></b>
There will be two functions:
<ul>
<li>verticalFive(): Print stars in vertical order</li>
<li>horizontalFive(): Print stars in horizontal order</l>
</ul><b>User Task:</b>
Your task is to complet... | 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 a Binary Search Tree and 2 node value <b>n1</b> and <b>n2</b>, your task is to find the <b>lowest common ancestor(LCA)</b> of the two nodes given.
It may happen that values n1 and n2 may or may be not present.
<b>Note:</b> Duplicates are not inserted in the BST.<b>User Task:</b>
This is a ... | Compilable |
For this Question: Adam and James are two very close friends and they ensure that everything that they own should be almost similar. Now they are purchasing new smartphones and they want to have their mobile number almost similar.
<b>Note:</b>
(i) Two phone numbers are almost similar if they are anagrams.
(ii) anagr... | 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: 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: While Alicent and Rhaenyra were walking in the Godswood, they noticed a slight abnormality in one of the Weirwood trees. This poked an idea into Alicent's mind, and she decides to ask a puzzle to Rhaenyra.
Alicent selects a tree with N nodes numbered from 1 to N, and gives Rhaenyra an empty array ... | Compilable |
For this Question: Sara is trying a new type of game in which she can jump in either the left direction or in the right direction. Also after each jump the range of her jump increases by 1 unit. i.e if starts from 1 in the next jump she has to jump 2 units then 3 units and so on.
Given the number of jumps as N, the ra... | Compilable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.