Add office photos
Employer?
Claim Account for FREE

Freshworks

3.5
based on 699 Reviews
Video summary
Filter interviews by

Botree Software International Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Invert a Binary Tree

You are provided with a Binary Tree and one of its leaf nodes. Your task is to invert this binary tree, making sure to adhere to the following guidelines:

  • The given leaf node becomes the r...read more
Ans.

Invert a binary tree with a given leaf node as the new root, following specific guidelines.

  • Start by identifying the leaf node provided in the input.

  • Follow the guidelines to invert the binary tree with the leaf node as the new root.

  • Ensure that the left child becomes the right child of the new root if available, and the parent becomes the left child.

  • Implement the inversion process for each test case and output the resulting binary tree in the same format as the input.

Add your answer

Q2. Merge Two Sorted Arrays Problem Statement

Given two sorted integer arrays ARR1 and ARR2 of size M and N, respectively, merge them into ARR1 as one sorted array. Assume that ARR1 has a size of M + N to hold all ...read more

Ans.

Merge two sorted arrays into one sorted array in place.

  • Iterate from the end of both arrays and compare elements to merge in place

  • Use two pointers to keep track of the current position in each array

  • Update the elements in ARR1 from the end to the beginning

Add your answer

Q3. Deepest Left Leaf Node Problem Statement

You are provided with a binary tree consisting of 'N' nodes. Your goal is to identify the deepest leaf node that is a left child of some node within the given binary tre...read more

Ans.

Identify the deepest left leaf node in a binary tree.

  • Traverse the binary tree in level order to find the deepest left leaf node.

  • Keep track of the maximum depth and the value of the deepest left leaf node found so far.

  • Return the value of the deepest left leaf node at the end.

Add your answer

Q4. Valid Parentheses Problem Statement

Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.

Input:

The first line contains an integer...read more
Ans.

The task is to determine if a given string consisting of parentheses is balanced or not.

  • Iterate through each character in the string and use a stack to keep track of opening parentheses

  • If an opening parenthesis is encountered, push it onto the stack

  • If a closing parenthesis is encountered, check if it matches the top of the stack. If it does, pop the stack, else return 'Not Balanced'

  • At the end, if the stack is empty, return 'Balanced', else return 'Not Balanced'

Add your answer
Discover Botree Software International interview dos and don'ts from real experiences

Q5. Reverse Integer Problem Statement

Given a 32-bit signed integer N, your task is to return the reversed integer. If reversing the integer causes overflow, return -1.

Input:

The first line contains an integer 'T'...read more
Ans.

Reverse a 32-bit signed integer and handle overflow cases.

  • Implement a function to reverse the given integer.

  • Check for overflow conditions and return -1 if overflow occurs.

  • Use 32-bit capacity data types only.

  • Example: For input 123, output should be 321.

Add your answer

Q6. Sub Sort Problem Statement

You are given an integer array ARR. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in ascendi...read more

Ans.

Find the length of the shortest subarray that needs to be sorted to make the entire array sorted in ascending order.

  • Iterate from left to right to find the first element out of order.

  • Iterate from right to left to find the last element out of order.

  • Calculate the length of the subarray between the out of order elements.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Botree Software International

based on 4 interviews
1 Interview rounds
Coding Test Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Graduate Trainee Interview Questions from Similar Companies

3.8
 • 36 Interview Questions
3.7
 • 34 Interview Questions
3.7
 • 12 Interview Questions
3.5
 • 11 Interview Questions
4.0
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter