Cvent
Bdh Industries Interview Questions and Answers
You have been given an undirected graph with 'N' vertices and 'M' edges. The vertices are labelled from 1 to 'N'.
Your task is to find if the graph contains a cycle or not.
A pat...read more
Given a sequence of queries of insertion and deletion from 3 stacks, you need to implement three stacks using a single array such that the size of the array doesn’t exceed th...read more
Difference between Compiled and Interpreted Language?
Q4. Difference between Interpreted Language and compiled Language
Interpreted languages are executed directly by the interpreter while compiled languages are first converted to machine code.
Interpreted languages are slower than compiled languages as they are executed line by line.
Compiled languages are faster as the code is already converted to machine code.
Interpreted languages are easier to debug as errors can be caught at runtime.
Compiled languages are harder to debug as errors can only be caught during compilation.
Examples of interprete...read more
Q5. Implement 3 stacks using 1 array
Implement 3 stacks using 1 array
Divide the array into 3 equal parts
Use pointers to keep track of top of each stack
Push and pop elements based on the pointer of the respective stack
Q6. Detect cycle in a graph
Detect cycle in a graph
Use Depth First Search (DFS) algorithm to traverse the graph
Maintain a visited set to keep track of visited nodes
If a node is visited again during DFS, then a cycle exists
If all nodes are visited and no cycle is found, then no cycle exists
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month