Interview Question for SDE-2s
- 0of 0 votes
You have been given a special and normal status of alphabets.- acharyashailendra1 September 19, 2019 in India
e.g. “01111001111111111011111111” represents “abcdefghijklmnopqrstuvwxyz”. Here 0 represents normal character and 1 represents special character.
Given an Input String S and a number k, find the maximum continuous sub array with maximum k number of number elements. There is no constraint on special character.
S = “giraffe”, K = 1, “011110011111111110111111”
Output : 3
normal characters : a, g, f
one of the possible solution : gir (as this has only one normal character)
| Report Duplicate | Flag | PURGE
Interview Type: Written Test
Open Chat in New Window