OYO | Online Screening | Round 1 | Tree | DP | SDE 2

Hi All,
Just want to share my OYO interview experience hope it helps someone

  • Question:
  1. Given a binary tree, the task is to find the length of the longest path which forms an Arithmetic Progression. The path can start and end at any node of the tree.

  2. Question 2: Given an array of string S[] of size N, the task is to find the maximum size of the resultant string formed by adding some strings and following the given condition that If a string of size K is chosen to add in the resultant string then the next K/2 strings cannot be selected to be a part of the resultant array.

     Input: S[] = {“well”,do, “hi”,by}
     Output: 6
Comments (2)