Online Coding Test
1. Given a boolean matrix mat[N][N] of size MXN, modify it such that if a matrix call mat[i][j] is 1, then make all cells of its row and column as 1.
2. Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.
3. There is an array of strings. For example:
Victor, Veronica, Farah, Veronica, Farah, Veronica
Farah and Veronica occurs maximum no of times. As Veronica comes after Farah in alphabetical order, output should be Veronica.
Victor, Veronica, Farah, Veronica, Farah, Veronica
Farah and Veronica occurs maximum no of times. As Veronica comes after Farah in alphabetical order, output should be Veronica.
F2F Round 1
1. Clone a linked list with next and random pointers
2. Generate 0 and 1 with 25% and 75% probability
3. Given an infinite stream of integers, find Kth largest element at any point of time.
F2F Round 2
1. Design an entry and exit system for a mall where at max n people can be there at one point of time inside mall
2. Given a matrix where each cell contains x no of gold coins and a constraint that you can only move right or down from top left corner to bottom right corner, find the maximum no of coins that you can collect. Write a code for the same.
F2F Round 3
1. Print all possible partition of a given string into dictionary words. (Variant of word break problem)
No comments:
Post a Comment