## How to efficiently build a tree from a flat structure?

I have a bunch of objects in a flat structure. These objects have an ID and a ParentID property so they can be … Read more

## How to find the lowest common ancestor of two nodes in any binary tree?

The Binary Tree here is may not necessarily be a Binary Search Tree. The structure could be taken as – struct node { … Read more

## Performing Breadth First Search recursively

Let’s say you wanted to implement a breadth-first search of a binary tree recursively. How would you go about it? Is it possible … Read more

## Algorithm to find Largest prime factor of a number

What is the best approach to calculating the largest prime factor of a number? I’m thinking the most efficient would be the following: … Read more

## How does finding a cycle start node in a cycle linked list work?

I understand that Tortoise and Hare’s meeting concludes the existence of a loop, but how does moving tortoise to the beginning of linked … Read more

## Are there any worse sorting algorithms than Bogosort (a.k.a Monkey Sort)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more

## Non-recursive depth first search algorithm [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more

## What are the mathematical/computational principles behind this game?

My kids have this fun game called Spot It! The game constraints (as best I can describe) are: It is a deck of … Read more

## Difference between Divide and Conquer Algo and Dynamic Programming

What is the difference between Divide and Conquer Algorithms and Dynamic Programming Algorithms? How are the two terms different? I do not understand … Read more

## What exactly does big Ө notation represent?

I’m really confused about the differences between big O, big Omega, and big Theta notation. I understand that big O is the upper … Read more