Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gatesy/examples

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

examples

Lowest Common Ancestor (LCA)

An F# implementation of the lowest common ancestor problem. Provides 3 solutions:

  • With a parent pointer - build paths from the root to the nodes and find the lowest node where these paths overlap.
  • Without a parent pointer - build paths from the root using depth first search and then apply the first solution's algorithm
  • Without a parent pointer - search using a pruning heuristic: once we have found one of the nodes in the tree we don't need to consider any nodes below it, as the LCA must be either it or a node above it.

About

Solutions to various toy problems in F#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.