MrKWatkins
  • Home
  • Algorithms
  • C#
  • Oakley
  • Poker
  • Rendering
  • Rust
Subscribe
Tagged

Algorithms

A collection of 3 posts

Poker

Card Combinations

Before we can start evaluating five card poker hands we actually need to get some five card poker hands. So we need some code to produce five card hand combinations from a full deck of cards. Combinations can be built recursively. Start with an empty combination and add cards from

  • Kevin Watkins
Kevin Watkins Feb 19, 2022 • 4 min read
Algorithms

Topological Ordering

Topological ordering is ordering dependent items in such a way that items you depend upon come first in the ordering. For example if x depends on y and y depends on z then the topological order would be z, y, x. Maybe dependency ordering would be a better name; it

  • Kevin Watkins
Kevin Watkins Feb 24, 2020 • 2 min read
Algorithms

Combinatorial Explosion!

The other day I hit a combinatorial explosion when using Haskell's nub function. Whilst I knew it was \( O(n^2) \) I thought my \( n \) (~28,000) wasn't big enough to cause a problem. Turns out it was... Therefore to get a better feel for the size of the numbers

  • Kevin Watkins
Kevin Watkins Jan 9, 2014 • 1 min read
MrKWatkins © 2022
Powered by Ghost