Add office photos
Engaged Employer

Synopsys

3.9
based on 330 Reviews
Filter interviews by

Continental Interview Questions and Answers

Updated 2 Aug 2024
Popular Designations

Q1. Algorithm to find GCD

Ans.

Algorithm to find GCD

  • Use Euclid's algorithm to find GCD

  • Divide the larger number by the smaller number

  • If remainder is 0, smaller number is GCD

  • If remainder is not 0, repeat with smaller number and remainder

Add your answer

Q2. find leaves in a binary tree, left to right.

Ans.

Traverse the binary tree using a queue to find leaves from left to right.

  • Start by adding the root node to a queue

  • While the queue is not empty, dequeue a node and check if it is a leaf node (both children are null)

  • If it is a leaf node, add its value to the result array

  • If it is not a leaf node, enqueue its children in left to right order

Add your answer

Q3. Matrix traversal algorithm

Ans.

Matrix traversal algorithm is used to visit each element of a matrix in a specific order.

  • Matrix traversal can be done using nested loops.

  • There are different traversal orders like row-wise, column-wise, spiral, diagonal, etc.

  • Traversal can be optimized using techniques like caching and parallel processing.

Add your answer

Q4. Fundamentals of data structure

Ans.

Data structure is a way of organizing and storing data in a computer so that it can be accessed and used efficiently.

  • Data structures are used to manage large amounts of data efficiently.

  • Common data structures include arrays, linked lists, stacks, queues, trees, and graphs.

  • Choosing the right data structure for a particular problem can greatly improve the efficiency of an algorithm.

  • Understanding data structures is essential for designing and implementing efficient algorithms.

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

Q5. Code of in-order traversal

Ans.

In-order traversal is a way of visiting all nodes of a binary tree in a specific order.

  • Start at the root node

  • Traverse the left subtree recursively

  • Visit the root node

  • Traverse the right subtree recursively

Add your answer

Q6. Reverse the linklist.

Ans.

To reverse a linked list, iterate through the list and change the direction of pointers.

  • Iterate through the linked list and keep track of the previous, current, and next nodes.

  • Update the pointers of each node to reverse the direction.

  • Set the head of the linked list to the last node encountered during iteration.

Add your answer

Q7. Find cycle in linked list

Ans.

Detecting cycles in a linked list using Floyd's Tortoise and Hare algorithm

  • Use two pointers - slow and fast

  • If there is a cycle, the two pointers will eventually meet

  • Time complexity is O(n) and space complexity is O(1)

Add your answer

Q8. bfs in binary tree

Ans.

Breadth-first search (BFS) is a traversal algorithm used to visit all nodes of a binary tree level by level.

  • Start at the root node and visit all nodes at the current level before moving to the next level.

  • Use a queue data structure to keep track of nodes to visit next.

  • Example: BFS traversal of a binary tree - 1 -> 2 -> 3 -> 4 -> 5

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

Interview Process at Continental

based on 3 interviews in the last 1 year
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top R&D Engineer Interview Questions from Similar Companies

4.0
 • 31 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
Get AmbitionBox app

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