Instruction
stringlengths
261
35k
Response
stringclasses
1 value
For this Question: Given a matrix of N*N dimensions. Take the input and display the matrix as an output.First line contains N. N lines follow each containing N space seperated integers. Constraints:- 2 <= N <= 500 1 <= Mat[i][j] <= 1000Print the given matrix.Input: 2 3 4 7 6 Output: 3 4 7 6 Input: ...
Compilable
For this Question: Given a matrix of N*N dimensions. Take the input and display the matrix as an output.First line contains N. N lines follow each containing N space seperated integers. Constraints:- 2 <= N <= 500 1 <= Mat[i][j] <= 1000Print the given matrix.Input: 2 3 4 7 6 Output: 3 4 7 6 Input: ...
Compilable
For this Question: Arun has gone shopping for his new restaurant along with his 8-year-old daughter, Shruthi. They have bought N items. The items are numbered from 1 to N, and item i weighs W<sub>i</sub> grams. Shruthi is eager about helping carry the groceries for her father. She asks her father to give her some items...
Compilable
For this Question: Arun has gone shopping for his new restaurant along with his 8-year-old daughter, Shruthi. They have bought N items. The items are numbered from 1 to N, and item i weighs W<sub>i</sub> grams. Shruthi is eager about helping carry the groceries for her father. She asks her father to give her some items...
Compilable
For this Question: Given a string S (containing only letters of the English alphabet), find all the capital letters in it (in exactly same order as the string) Note:- It is guaranteed that the given string will contain at least one capital.Input contains a single line containing the string S. Constraints:- 1 <= ...
Compilable
For this Question: Given a string S (containing only letters of the English alphabet), find all the capital letters in it (in exactly same order as the string) Note:- It is guaranteed that the given string will contain at least one capital.Input contains a single line containing the string S. Constraints:- 1 <= ...
Compilable
For this Question: Given a string S (containing only letters of the English alphabet), find all the capital letters in it (in exactly same order as the string) Note:- It is guaranteed that the given string will contain at least one capital.Input contains a single line containing the string S. Constraints:- 1 <= ...
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: Modify the <code>takeMultipleNumbersAndAdd </code> such that it can take any number of arguments and return its sum. This is JS only question.Function should be able to take any number of argsSum of the numberstakeMultipleNumbersAndAdd(1, 2, 2) should return 5 because 1 + 2 + 2 takeMultipleNu...
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: 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: Given a postfix expression, your task is to evaluate given expression. Infix expression: The expression of the form a operator b. When an operator is in-between every pair of operands. Postfix expression: The expression of the form a b operator. When an operator is followed for every pair of oper...
Compilable
For this Question: Given a postfix expression, your task is to evaluate given expression. Infix expression: The expression of the form a operator b. When an operator is in-between every pair of operands. Postfix expression: The expression of the form a b operator. When an operator is followed for every pair of oper...
Compilable
For this Question: Given a postfix expression, your task is to evaluate given expression. Infix expression: The expression of the form a operator b. When an operator is in-between every pair of operands. Postfix expression: The expression of the form a b operator. When an operator is followed for every pair of oper...
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: There is class of students. Their teacher is taking their attendance in the morning as usual. But this time, the list of students in the register feels weird. There are suddenly more names there. Apparently a few mischevious students have repeated their names in the register. Find the number of these...
Compilable
For this Question: There is class of students. Their teacher is taking their attendance in the morning as usual. But this time, the list of students in the register feels weird. There are suddenly more names there. Apparently a few mischevious students have repeated their names in the register. Find the number of these...
Compilable
For this Question: There is class of students. Their teacher is taking their attendance in the morning as usual. But this time, the list of students in the register feels weird. There are suddenly more names there. Apparently a few mischevious students have repeated their names in the register. Find the number of these...
Compilable
For this Question: Given a string S, containing only letters { 'N', 'E', 'W', 'T', 'O'} like "NWTEONEW" or "NEWTON" your task is to print all the substring of size 10 which occur more than once in the given string.Input contains a single line containing the string S. Constraints:- 10 < = |String| < = 10000Print all...
Compilable
For this Question: Given a string S, containing only letters { 'N', 'E', 'W', 'T', 'O'} like "NWTEONEW" or "NEWTON" your task is to print all the substring of size 10 which occur more than once in the given string.Input contains a single line containing the string S. Constraints:- 10 < = |String| < = 10000Print all...
Compilable
For this Question: Given a string S, containing only letters { 'N', 'E', 'W', 'T', 'O'} like "NWTEONEW" or "NEWTON" your task is to print all the substring of size 10 which occur more than once in the given string.Input contains a single line containing the string S. Constraints:- 10 < = |String| < = 10000Print all...
Compilable
For this Question: Given a number N, find the sum of all the digits of the number Note: Use a recursive method to solve this problem.<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>Sum()</b> that takes the integer N as a parameter. ...
Compilable
For this Question: Given a number N, find the sum of all the digits of the number Note: Use a recursive method to solve this problem.<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>Sum()</b> that takes the integer N as a parameter. ...
Compilable
For this Question: Anya owns N triplets of integers (A<sub>i</sub>, B<sub>i</sub>, C<sub>i</sub>), for each i from 1 to N. She asks you to find a sequence of integers which satisfies the following conditions: 1. The sequence contains at least C<sub>i</sub> distinct integers from the closed interval [A<sub>i</sub>, B...
Compilable
For this Question: Anya owns N triplets of integers (A<sub>i</sub>, B<sub>i</sub>, C<sub>i</sub>), for each i from 1 to N. She asks you to find a sequence of integers which satisfies the following conditions: 1. The sequence contains at least C<sub>i</sub> distinct integers from the closed interval [A<sub>i</sub>, B...
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 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: In a new plot by Hydra to kill the avengers, Doctor Zola comes up with a new form of poison composed of chromosomes A, C, T and G. The poison is a string of length n (where n is divisible by 4) with each of the four letters occurring exactly n/4 times. For example, GACT and AAGTGCCT are both fatal po...
Compilable
For this Question: In a new plot by Hydra to kill the avengers, Doctor Zola comes up with a new form of poison composed of chromosomes A, C, T and G. The poison is a string of length n (where n is divisible by 4) with each of the four letters occurring exactly n/4 times. For example, GACT and AAGTGCCT are both fatal po...
Compilable
For this Question: In a new plot by Hydra to kill the avengers, Doctor Zola comes up with a new form of poison composed of chromosomes A, C, T and G. The poison is a string of length n (where n is divisible by 4) with each of the four letters occurring exactly n/4 times. For example, GACT and AAGTGCCT are both fatal po...
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: You are given a binary string s. You are allowed to perform two types of operations on the string in any sequence: Type-1: Remove the character at the start of the string s and append it to the end of the string. Type-2: Pick any character in s and flip its value, i. e., if its value is '0' it be...
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: 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: 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 N integers, give the number with maximum frequency. If multiple numbers have maximum frequency print the maximum number among them.The first line of the input contains an integer N, and the Second line contains N space-separated integers of the array. <b>Constraints:</b> 3 <= N ...
Compilable
For this Question: Given an array of N integers, give the number with maximum frequency. If multiple numbers have maximum frequency print the maximum number among them.The first line of the input contains an integer N, and the Second line contains N space-separated integers of the array. <b>Constraints:</b> 3 <= N ...
Compilable
For this Question: Given an array of N integers, give the number with maximum frequency. If multiple numbers have maximum frequency print the maximum number among them.The first line of the input contains an integer N, and the Second line contains N space-separated integers of the array. <b>Constraints:</b> 3 <= N ...
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: Given an integer N, your task is to print all the even integer from 1 to N.<b>User task:</b> Since this will be a functional problem, you don't have to take input. You just have to complete the functions <b>For_Loop()</b> that takes the integer n as a parameter. </b>Constraints:</b> 1 <= N <= 10...
Compilable
For this Question: Arpit Gupta has brought a toy for his valentine. She is playing with that toy which runs for T seconds when winded.If winded when the toy is already running, from that moment it will run for T seconds (not additional T seconds) For example if T is 10 and toy has run for 5 seconds and winded at this m...
Compilable
For this Question: Arpit Gupta has brought a toy for his valentine. She is playing with that toy which runs for T seconds when winded.If winded when the toy is already running, from that moment it will run for T seconds (not additional T seconds) For example if T is 10 and toy has run for 5 seconds and winded at this m...
Compilable
For this Question: Arpit Gupta has brought a toy for his valentine. She is playing with that toy which runs for T seconds when winded.If winded when the toy is already running, from that moment it will run for T seconds (not additional T seconds) For example if T is 10 and toy has run for 5 seconds and winded at this m...
Compilable
For this Question: Tom loves palindromes. He has the power to convert any ordinary string to a palindrome. In one move tom can choose a character of a string and change it to any other character. Given a string, find the minimum number of moves in which tom can change it to a palindrome.Input consists of a string. E...
Compilable
For this Question: Tom loves palindromes. He has the power to convert any ordinary string to a palindrome. In one move tom can choose a character of a string and change it to any other character. Given a string, find the minimum number of moves in which tom can change it to a palindrome.Input consists of a string. E...
Compilable
For this Question: Ralph likes to play with shapes, he chooses a number <b> n</b> of his choice and tries to make a special triangle shape out of it containing n rows.The input contains N as an input. </b>Constraint:</b> 1 <b>&le;</b> N <b>&le;</b> 20Print a special triangle pattern of numbers of height N.Input: 5...
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: 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: Sara has an array Arr of N elements and an element K. Sara loves XOR so she took the xor value of all the possible subarrays(N*(N+1)/2)) from the given array and stored them in non- increasing order. Sara wants to know the kth maximum element of all the subarray's XOR. Since you want to impress Sara ...
Compilable
For this Question: Sara has an array Arr of N elements and an element K. Sara loves XOR so she took the xor value of all the possible subarrays(N*(N+1)/2)) from the given array and stored them in non- increasing order. Sara wants to know the kth maximum element of all the subarray's XOR. Since you want to impress Sara ...
Compilable
For this Question: Given an integer N find number of positive integers with N digits with all digits in non-decreasing order. As this can be large find ans modulo 1000000007. For example 111227 is valid whereas 1112231 is not.Input contains one line of input containing a single integer N. 1 <= N <= 1000000000000P...
Compilable
For this Question: Given an integer N find number of positive integers with N digits with all digits in non-decreasing order. As this can be large find ans modulo 1000000007. For example 111227 is valid whereas 1112231 is not.Input contains one line of input containing a single integer N. 1 <= N <= 1000000000000P...
Compilable
For this Question: There is a rule in ludo that a token can only be unlocked when either a 1 or 6 shown in the die. Given the die number N, Your task is to check whether the token can be unlocked or not.<b>User Task:</b> Since this will be a functional problem, you don't have to take input. You just have to complete t...
Compilable
For this Question: There is a rule in ludo that a token can only be unlocked when either a 1 or 6 shown in the die. Given the die number N, Your task is to check whether the token can be unlocked or not.<b>User Task:</b> Since this will be a functional problem, you don't have to take input. You just have to complete t...
Compilable
For this Question: There is a rule in ludo that a token can only be unlocked when either a 1 or 6 shown in the die. Given the die number N, Your task is to check whether the token can be unlocked or not.<b>User Task:</b> Since this will be a functional problem, you don't have to take input. You just have to complete t...
Compilable
For this Question: There is a rule in ludo that a token can only be unlocked when either a 1 or 6 shown in the die. Given the die number N, Your task is to check whether the token can be unlocked or not.<b>User Task:</b> Since this will be a functional problem, you don't have to take input. You just have to complete t...
Compilable
For this Question: When Sasha was a little girl, she came to know that the LCM of two numbers can be defined as: LCM(a, b) = ab &frasl; GCD(a, b). However, she was disappointed to learn that LCM was not defined similarly for more than two numbers. She thus defined a new concept, Sasha's LCM, as: Sasha's LCM(x<sub>1...
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: Newton's College is organizing a Technical Fest named Technox'23 this year with a budget of Y Thousand Rupees. As DSA Coding Event is the most important function of their Fest, they allocate at least half of their budget to it. There are also 5 other events planned under Technox'23. The team wants t...
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: Write a function called lucky_sevens which takes an array of integers and returns true if any three consecutive elements sum to 7An array containing numbers.Print true if such triplet exists summing to 7 else print falseSample input:- [2, 1, 5, 1, 0] [1, 6] Sample output:- true false Explan...
Compilable
For this Question: You are given two sorted arrays A and B of size N and M respectively. You have to find the value V, which is the summation of (A[j] - A[i]) for all pairs of i and j such that (j - i) is present in array B.The first line contains two space separated integers N and M – size of arrays A and B respect...
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 two strings A and B, you can perform three types of moves:- 1. Insert an element at any position 2. Delete an element from any position 3. Replace any element. Your task is to convert String A into String B in a minimum number of moves.First line of input contains the string A, next line co...
Compilable
For this Question: Given two strings A and B, you can perform three types of moves:- 1. Insert an element at any position 2. Delete an element from any position 3. Replace any element. Your task is to convert String A into String B in a minimum number of moves.First line of input contains the string A, next line co...
Compilable
For this Question: Given two strings A and B, you can perform three types of moves:- 1. Insert an element at any position 2. Delete an element from any position 3. Replace any element. Your task is to convert String A into String B in a minimum number of moves.First line of input contains the string A, next line co...
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: Given a boolean matrix of size N*M in which each row is sorted your task is to print the index of the row containing maximum 1's. If multiple answer exist print the smallest one.First line contains two space separated integers denoting values of N and M. Next N lines contains M space separated intege...
Compilable
For this Question: Given a boolean matrix of size N*M in which each row is sorted your task is to print the index of the row containing maximum 1's. If multiple answer exist print the smallest one.First line contains two space separated integers denoting values of N and M. Next N lines contains M space separated intege...
Compilable
For this Question: Given a boolean matrix of size N*M in which each row is sorted your task is to print the index of the row containing maximum 1's. If multiple answer exist print the smallest one.First line contains two space separated integers denoting values of N and M. Next N lines contains M space separated intege...
Compilable
For this Question: Given a boolean matrix of size N*M in which each row is sorted your task is to print the index of the row containing maximum 1's. If multiple answer exist print the smallest one.First line contains two space separated integers denoting values of N and M. Next N lines contains M space separated intege...
Compilable