Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

National Instruments Interview Experience | Set 3 (Programming Test)

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

There were two questions.

Q 1. Given N and N elements Find the number of distinct sums. For example:
3
1, 2, 3
Possible sums of all subarrays: 1, 2, 3, 3, 5, 6. Return Value: 5 (Distinct sums are: 1, 2, 3, 5, 6)

Q 2. Given a string S, and a matrix M of characters. find if S exist in M or not.
Test case:
abc
3 3
a v f
g b e
c b e
Answer: (0, 0) (1, 1) (2, 0)

All 8 neighbors considered.

Solved 1st with 100% success, and in 2nd 14/16 cases were passing.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

My Personal Notes arrow_drop_up
Last Updated : 02 Jan, 2016
Like Article
Save Article
Similar Reads