Tip 1 : learn basics
Tip 2 : learn any oops language and practice.
Tip 3 : code as much as you can.
Tip 1 : short and precise. Upto the point.
Tip 2 : keep few things aside from resume
They give you 6 hr. For 6 question but the good part is that you need to complete atleast 1 question and you are good to go.
Round will be cleared only after attempting one question and rest of the questions are for improving your rank.
. * .
* * *
* . *
* * *
* * *
* * *
* * *
. * .
* * *
* * *
* . *
* * *
* . *
* . *
* * *
It is guaranteed that no two constellations are overlapping.
1. Day starts with hour 1 and ends with hour ‘DAY_HOURS’.
2. Each hour of the prime group should be in a different part of the day.
3. If there is no prime group then return zero.
4. ‘DAY_HOURS’ should be divisible by ‘PARTS’, meaning that the number of hours per part (DAY_HOURS/PARTS) should be a natural number.
Let ‘DAY_HOURS’ = 20 and ‘PARTS’ = 2
Hence the view of our day would be in the following format:
1 2 3 4 5 6 7 8 9 10 - Part 1
11 12 13 14 15 16 17 18 19 20 - Part 2
1-11 Not a prime group because 1 is not prime.
2-12 Not a prime group because 12 is not prime.
3-13 Because both 3 and 13 are prime, it is an equivalent prime group.
4-14 Not a prime group because 4 and 14 are not prime.
5-15 Not a prime group because 15 is not prime.
6-16 Not a prime group, because 6 and 16 are not prime.
7-17 Because both 7 and 17 are prime, it is an equivalent prime group.
8-18 Not a prime group, because 8 and 18 are, is not prime.
9-19 Not a prime group because 9 is not prime.
10-20 Not a prime group because both 10 and 20 are not prime.
Hence there are 2 equivalent prime groups in the above format which are 3-13 and 7-17.
Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)
And chocolates in each packet is : {8, 11, 7, 15, 2}
All possible way to distribute 5 packets of chocolates among 3 students are -
( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
You can’t decrease a number below 0.
You are given ‘K’ = 5, and matrix
‘mat’ = [[1, 2, 3],
[4, 0, 5],
[2 , 7, 4]]
You can do 3 operations on element 7 and 2 operations on element 5. Then the sum of all submatrices will be 246.
Each pair should be sorted i.e the first value should be less than or equals to the second value.
Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
What are your aspirations.
What is your biggest achievement.
Willing to relocate?
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?