Jobs
Interviews

A&D Associates

A&D Associates is a strategic consulting firm focused on helping companies enhance their operational performance through innovative solutions and expert guidance.

Interview Questions for A&D Associates

1. What is Java?

2. What is the code to calculate the distance between two nodes in a binary tree?

3. Given an array of integers arr, and three integers a, b and c. You are tasked with finding the number of good triplets. A triplet (arr[i], arr[j], arr[k]) is good if the following conditions are true: 0 <= i < j < k < arr.length |arr[i] - arr[j]| <= a |arr[j] - arr[k]| <= b |arr[i] - arr[k]| <= c Where the notation |x| denotes the absolute value of x. Return the number of good triplets.

4. 1d DP Graph -> cycle in acyclic graph

5. How do you construct a tree from preorder and postorder traversals?