Swift Coding
Published in

Swift Coding

Tries in Swift

Tries are prefix trees, where the key is usually a String.

If you think that sounds something like a use for a dictionary in Swift, well, maybe you should read on and see the evidence.

Prerequisites:

  • Dictionaries
  • Some experience of trees and terminology (i.e. root, edge, child, parent, node, path etc.)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store