SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func contains (word: String) -> Bool {
  2.         var node = root
  3.         for char in word {
  4.             if node.children[char] == nil {
  5.                 return false
  6.             }
  7.             node = node.children[char]!
  8.  
  9.         }
  10.         return node.isFinal
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top