LinkedIn Interview Experience | Set 2 (On-Campus)
Online coding 1 hr, 3 Questions.
1. We have to implement getIntComplement() function , that will give complement of an given integer .
2. There are “n” ticket windows in the railway station. ith window has ai tickets available. Price of a ticket is equal to the number of tickets remaining in that window at that time. When “m” tickets have been sold, what’s the maximum amount of money the railway station can earn?
exa. n=2, m=4
in 2 window available tickets are : 2 , 5
from 2nd wicket sold 4 tickets so 5+4+3+2=14.
3. There is a particular sequence only uses the numbers 1, 2, 3, 4 and no two adjacent numbers are the same.
Write a program that given n1 1s, n2 2s, n3 3s, n4 4s will output the number of such sequences using all these numbers.
Output your answer modulo 1000000007 (10^9 + 7).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Login to comment...