Adobe Computer Scientist 2
Anonymous User
914

First round was pure DS ALGO
Two question. 1 easy and 1 medium
1st question was
Given a stream of characters, find the first non-repeating character from the stream
val stream2 = listOf('x', 'x', 'y', 'z', 'y', 'z', 'w')
output should be - listOf('x','#','y','y','z','#','w')

Second Question
Find the longest sequence of zero's surrounded by 1
[1,0,0,1,0,0,0,1] - 3
[0,0,0,0,1] - 0
[1,0,0,0,0] - 0
[1,0,0,0,1,1,0,0,0,0,0,1]- 5

Comments (1)