IBM Online Assessment Questions | On Campus
Anonymous User
5896

The assesment took on hackerank. There were 5 coding questions and 21 MCQs on OS,Networks,OOPs, microprocessors and digital design.
The coding questions were:
Q1: Given a map of a city in matrix format a * b. Where 'a' represent number of rows 1...a and 'b' represents number of column 1...b. All the buses in this city only operates along a row. In short start and end of every bus is in same row.Given the city map (a and b) and bus routes of all buses r in the city can you find the number of cells the bus don't operate in the city. Note It is possible to have overlap bus routes.
Example:
a=3 and b=3 routes r=3
row no ,start, end
1,2,3
2,1,2
3 1 3
Output: 2
Explanation:
We have one empty cell in row1 and row2 hence number of cells where bus don't operate in above map is 2.
The visual presentation of bus route in above city map where X represents cell where bus operates and - where buses don't.
-XX
XX-
XXX
Q2: Given an array of intergers,find the gcd of the array. If the gcd is 1 return -1
Q3: Given two strings a and b, check if palindrome can be made by concatinating substrings from a and b
Q4: Remove nth node from the back of the linked list
Q5: An ISP has to setup connections between n nodes. At max there can be m connections. Each node has two options, either be a host or be linked to a node. Determine the minimum cost of wiring the whole network.
Example:
n=5
m=4
hosting cost=3
linking cost=1
Clusters:
1 2
1 3
2 3
4 5
Output: 9
Explanation:
Optimal Connection is:
image
Hence cost is 3+3+1+1+1=9

Comments (5)