Add office photos
Engaged Employer

Bounteous x Accolite

3.4
based on 809 Reviews
Filter interviews by

10+ Bharat Electronics Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Ninja and the Maze Problem Statement

Ninja is stuck in a maze represented as a 2D grid. He can move in four directions (Up, Down, Left, Right) until he hits a wall ('1'). Once stopped, he can choose a new direc...read more

Ans.

The problem involves determining if a ninja can reach the destination in a maze by moving in four directions until hitting a wall.

  • Create a function that takes in the maze, starting point, and destination coordinates as input.

  • Implement a recursive algorithm to explore all possible paths in the maze.

  • Check if the destination can be reached from the starting point by moving in four directions.

  • Return 'True' if a path exists, otherwise return 'False'.

View 1 answer

Q2. Topological Sort Problem Statement

Given a Directed Acyclic Graph (DAG) consisting of V vertices and E edges, your task is to find any topological sorting of this DAG. You need to return an array of size V repr...read more

Ans.

Topological sort of a Directed Acyclic Graph (DAG) is found by ordering the vertices in such a way that for every directed edge u -> v, u comes before v in the ordering.

  • Use Depth First Search (DFS) to find the topological ordering of the vertices.

  • Start by visiting a vertex and recursively visit its neighbors before adding it to the result array.

  • Maintain a visited array to keep track of visited vertices and a stack to store the topological ordering.

  • Once all neighbors of a vert...read more

Add your answer

Q3. Kth Largest Element Problem

Given an array containing N distinct positive integers and a number K, determine the Kth largest element in the array.

Example:

Input:
N = 6, K = 3, array = [2, 1, 5, 6, 3, 8]
Output...read more
Ans.

Find the Kth largest element in an array of distinct positive integers.

  • Sort the array in non-increasing order and return the Kth element.

  • Use a priority queue or quick select algorithm for efficient solution.

  • Ensure the array contains distinct positive integers for accurate result.

Add your answer

Q4. Left Rotations of an Array

Given an array of size N and Q queries, each query requires left rotating the original array by a specified number of elements. Return the modified array for each query.

Input:

The fi...read more
Ans.

Rotate an array left by a specified number of elements for each query.

  • Iterate through each query and rotate the array left by the specified number of elements using array slicing.

  • Handle cases where the number of rotations exceeds the length of the array by taking the modulo of the rotations.

  • Return the modified array after each query.

Add your answer
Discover Bharat Electronics interview dos and don'ts from real experiences

Q5. Trapping Rain Water Problem Statement

You are given a long type array/list ARR of size N, representing an elevation map. The value ARR[i] denotes the elevation of the ith bar. Your task is to determine the tota...read more

Ans.

Calculate the total amount of rainwater that can be trapped between given elevations in an array.

  • Iterate through the array and calculate the maximum height on the left and right of each bar.

  • Calculate the amount of water that can be trapped at each bar by taking the minimum of the maximum heights on the left and right.

  • Sum up the trapped water at each bar to get the total trapped water for the entire array.

Add your answer

Q6. Distinct Occurrences Problem Statement

You are given two strings 'A' and 'B' of lengths 'N' and 'M' respectively. Your task is to determine how many distinct ways string 'B' occurs as a subsequence in string 'A...read more

Ans.

Count the number of distinct occurrences of one string as a subsequence in another string.

  • Iterate through string A and string B to find all occurrences of B as a subsequence in A.

  • Use dynamic programming to keep track of the number of distinct occurrences.

  • Handle edge cases such as empty strings or strings of different lengths.

  • Example: For strings A='aabbcc' and B='abc', there are 3 distinct occurrences of B in A.

Add your answer
Are these interview questions helpful?

Q7. Median of Two Sorted Arrays

Given two sorted arrays A and B of sizes N and M, find the median of the merged array formed by combining arrays A and B. If the total number of elements, N + M, is even, the median ...read more

Ans.

Find the median of two sorted arrays by merging them and calculating the median of the combined array.

  • Merge the two sorted arrays into one sorted array.

  • Calculate the median of the merged array based on the total number of elements.

  • If the total number of elements is even, take the mean of the two middle elements as the median.

Add your answer

Q8. Distance Between Two Nodes in a Binary Tree

Given a binary tree and the values of two distinct nodes, determine the distance between these two nodes in the tree. The distance is defined as the minimum number of...read more

Ans.

Calculate the distance between two nodes in a binary tree.

  • Traverse the tree to find the paths from the root to each node

  • Find the lowest common ancestor of the two nodes

  • Calculate the distance by summing the distances from each node to the common ancestor

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Sort 0 1 2 Problem Statement

Given an integer array arr of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.

Input:

The first line contains an integer 'T' representing the number of...read more
Ans.

Sort an array of 0s, 1s, and 2s in linear time complexity.

  • Use three pointers to keep track of 0s, 1s, and 2s while iterating through the array.

  • Swap elements based on the values encountered to sort the array in-place.

  • Time complexity should be O(N) and space complexity should be O(1).

Add your answer

Q10. Intersection of Linked List Problem

You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.

Your task is to determine the data...read more

Ans.

Find the node where two linked lists merge, return -1 if no merging occurs.

  • Traverse both lists to find their lengths and the difference in lengths

  • Move the pointer of the longer list ahead by the difference

  • Traverse both lists simultaneously until they meet at the merging point

Add your answer
Q11. How many levels of normalization are there in database management systems?
Ans.

There are 3 levels of normalization in database management systems.

  • First Normal Form (1NF) - Eliminate duplicate data and ensure data is stored in a tabular format.

  • Second Normal Form (2NF) - Meet 1NF requirements and ensure all non-key attributes are fully functional dependent on the primary key.

  • Third Normal Form (3NF) - Meet 2NF requirements and ensure that there are no transitive dependencies between non-key attributes.

Add your answer
Q12. What are the sub-parts or phases of the analysis part in compiler design?
Ans.

The sub-parts or phases of the analysis part in compiler design include lexical analysis, syntax analysis, and semantic analysis.

  • Lexical analysis involves breaking the input into tokens such as keywords, identifiers, and operators.

  • Syntax analysis checks the structure of the tokens to ensure they conform to the grammar rules of the language.

  • Semantic analysis verifies the meaning of the program by checking for type compatibility and other semantic rules.

  • Examples include lexing ...read more

Add your answer
Q13. What is segmentation in the context of operating systems?
Ans.

Segmentation in operating systems is a memory management technique where memory is divided into segments of variable sizes.

  • Segments are logical units of a program such as code, data, stack, etc.

  • Each segment has its own base address and length.

  • Segmentation allows for more efficient memory management and protection.

  • Examples include Intel x86 architecture with segment registers like CS, DS, SS, etc.

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

Interview Process at Bharat Electronics

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

Top Software Developer Intern Interview Questions from Similar Companies

3.9
 • 46 Interview Questions
3.8
 • 25 Interview Questions
4.0
 • 16 Interview Questions
4.6
 • 16 Interview Questions
4.0
 • 10 Interview Questions
3.9
 • 10 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
70 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