Sample Questions
Sample Questions
Given a binary tree, write a function to determine whether it is a binary search tree (BST). A binary
search tree is defined as a binary tree in which for every node, the left subtree contains only nodes with
values less than the node’s value, and the right subtree contains only nodes with values greater than the
node’s value. Additionally, both the left and right subtrees must also be binary search trees. How would
you implement a solution to check if the given tree is a BST? (DO NOT USE RECURSION)
You are given an array age [] of N Age of Members and array member [] of M Name, LastName, Age of
Members,
The task is to find the name of the youngest missing member from the array age.
3) If more than one youngest member is missing then return first occurrence of the youngest
member
Input:
N = 5 age[] = {1,2,3,4,5},
Output: Leena
Explanation: Youngest member’s age not mentioned in age[] is 7 and Leena’s age is 7
Binary Addition
Given binary strings str1 and str2, add them and return the sum as a binary string.
Example:
Input 1:
Str1 = 100
Str2 = 010
Output:
110
Input2:
Str1 = 111
Str2 = 11
Output:
1010
Constraints
Keys in a B Tree
In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and
allows searches, sequential access, insertions, and deletions in logarithmic time. B tree is a specialized
m-way tree is widely used for disk access.
7776
7775
16384
16383
Abstract Reasoning 7
12 11
15 12
50
10 20
? 5
60
62
53
57
Which memory management technique is considered fast for modern day operating systems ?
Best Fit
First Fit
Next Fit
Worst Fit
Static int a;
Void func() {
Int c;
TCP connection
Only A
Only C
Both B and C
None of these
IP Magic
A. 201.119.1.30
B. 201.119.1.33
C. 201.119.1.46
A and B
B and C
A, B and C
None
A linux system administrator needs to securely transfer a file named myapp.log from a local
Server to a remote server using SSH. The system administrator has regular user privileges, and
Location/
[email protected]:/remove-dir/my-location/