Add office photos
Employer?
Claim Account for FREE

Samsung Research

3.2
based on 987 Reviews
Video summary
Filter interviews by

Cyberthink Infotech Interview Questions and Answers

Updated 17 Oct 2024
Popular Designations

Q1. Difference between dfs and bfs and code any one algo in trees and graphs. Two sum problem A puzzle 1/2 more coding questions mostly on basics

Ans.

Explaining the difference between DFS and BFS and coding an algorithm for trees and graphs.

  • DFS (Depth First Search) explores as far as possible along each branch before backtracking. BFS (Breadth First Search) explores all the vertices at the same level before moving to the next level.

  • DFS is useful for finding a path to a target node, while BFS is useful for finding the shortest path to a target node.

  • DFS can be implemented using recursion or a stack, while BFS can be implemen...read more

Add your answer

Q2. How will you approach a problem?

Ans.

I will approach a problem by breaking it down into smaller parts and analyzing each part individually.

  • Identify the problem and its scope

  • Gather all relevant information and data

  • Break down the problem into smaller parts

  • Analyze each part individually

  • Develop a plan of action

  • Implement the plan and monitor progress

  • Make adjustments as necessary

Add your answer

Q3. Write the code for the Dijkstra

Ans.

Dijkstra's algorithm finds the shortest path in a graph from a starting node to all other nodes.

  • Use a priority queue to keep track of the shortest distance to each node

  • Initialize distances to all nodes as infinity except the starting node as 0

  • Iterate through all nodes and update distances if a shorter path is found

  • Repeat until all nodes are visited and shortest paths are calculated

Add your answer

Q4. graph theory question - find diameter of tree

Ans.

The diameter of a tree is the longest path between any two nodes in the tree.

  • Find the longest path between any two nodes in the tree.

  • This can be done by running two depth-first searches (DFS) on the tree.

  • The diameter of the tree is the length of the path found by the second DFS.

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

Q5. Given binary tree is binary search or not

Ans.

A binary tree is considered a binary search tree if the left subtree of a node contains only nodes with keys less than the node's key and the right subtree contains only nodes with keys greater than the node's key.

  • Check if the left child of a node is less than the node's key and the right child is greater than the node's key

  • Recursively check all nodes in the tree to ensure they follow the binary search tree property

  • Inorder traversal of the tree should result in a sorted list ...read more

Add your answer

Q6. Dry run on a sample test.

Ans.

Dry run on a sample test involves mentally executing the code to understand its flow and output.

  • Understand the code logic and variables

  • Step through each line of code

  • Keep track of variable values at each step

  • Predict the output based on the code execution

Add your answer

Q7. find common ancestors of 2 nodes in tree

Ans.

To find common ancestors of 2 nodes in a tree, traverse from both nodes to root and store paths. Then find the intersection of paths.

  • Traverse from both nodes to root and store paths

  • Find the intersection of paths to get common ancestors

Add your answer

Q8. Best Time to buy and sell stocks

Ans.

The best time to buy stocks is when the price is low and the best time to sell is when the price is high.

  • Buy stocks when the market is down or during a recession to get them at a lower price.

  • Sell stocks when the market is up or during a boom to maximize profits.

  • Consider factors like company performance, market trends, and economic indicators before buying or selling stocks.

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

Interview Process at Cyberthink Infotech

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

Top Software Engineer Interview Questions from Similar Companies

3.5
 • 34 Interview Questions
1.9
 • 30 Interview Questions
4.0
 • 14 Interview Questions
3.1
 • 12 Interview Questions
3.5
 • 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
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