Phone Number Mnemonics β‡’ can use word and index to create each case without concatenation

  • first try

  • time: 4^n x n

    • n: length of phonenumber

    • each number β‡’ has max 4 different cases β‡’ each case run

      • n- 1, n - 2, …. β‡’ n

      • each time 4^n happens

  • space: 4^n cases, each case has length of n

concat part increase time

  • second try

  • removed concat

using word and its index to store each letter,

  • 4^n x n, 4^n x n

Last updated