Info Edge
Brandust Interview Questions and Answers
Q1. Rearrange Array Elements Problem Statement
Given an array A
containing 'N' integers and an integer m
, rearrange the elements of the array such that the differences between the array elements and m
are sorted in...read more
Q2. Anagram Pairs Problem Statement
Determine if two given strings are anagram pairs. Two strings are anagrams if the letters of one can be rearranged to form the other.
Input:
The input consists of a single line c...read more
Q3. Print Nodes at Distance K from a Given Node
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of these no...read more
The task is to find all nodes in a binary tree that are at a distance K from a given node.
Traverse the binary tree to find the given node
From the given node, perform a depth-first search to find all nodes at distance K
Use a list to store the values of the nodes at distance K
Return the list of values in any order
Q4. Triangle of Numbers Pattern
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
Example:
Input:
N = 4
Output:
1
232
34545
4567654
Explanation:
The pattern comprises n...read more
Q9. Insert node in binary search tree
To insert a node in a binary search tree, compare the value of the node to be inserted with the current node and traverse left or right accordingly.
Start at the root node and compare the value of the node to be inserted with the current node.
If the value is less than the current node, move to the left child node. If it is greater, move to the right child node.
Repeat this process until reaching a leaf node, then insert the new node as the left or right child of the leaf node.
Top HR Questions asked in Brandust
Interview Process at Brandust
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month