# HashedIn 上门挂经

Seaction A :
2 Output based questions, 2 questions on Data structures, 2 on OS, 2 on DBMS.

Section B :

1. Problem : Given 2 Strings str and word, you have to find how many words you can make from that given string.
Input : str=“This is a test String” word=“tsit”
Output : 2
Explanation : there are 4 t’s 4 s’s 3 i’s int the given str, by which u can only make 2 “tsit”.
Input: str=“Here is HashedIn Technologies” word=“neurons”
Ouput : 0
Explanation: since you do not have ‘u’ in str. thus u can’t form word “neurons”.
2. Problem : Given a 2D matrix of 0s and 1s, you have to find number of potholes in that. Potholes are defined as all neighbouring 1s(including diagonals).
Input :
1 1 0 0 0
0 1 0 0 1
1 0 0 0 1
0 0 0 0 0
1 0 1 0 1
Output : 5
Explanation: follow the bold 1s, there are 5 such potholes.
1 1 0 0 0
0 1 0 0 1
1 0 0 0 1
0 0 0 0 0
1 0 1 0 1
3. Based on Topological Sort. Can’t remeber the exact question.

Problem 1 : You are having a old NOKIA phone and you are given a string of integers and “*” only. You have to find the mess typed.
Input : 2222 * 444 * 5
Output: “AIJ”
Input : 222 * 2 * 8
Output: “CAT”

Problem 2 :
You are given a Binary Tree, you have to find a path such that the sum of element of the nodes in a path results to a given number x.