Open In App

LinkedIn Interview Experience | Set 2 (On-Campus)

Last Updated : 30 Aug, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

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).


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads