Skip to content

Files

Latest commit

 

History

History

hashmap-repeated-word

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Challenge Summary

create a function that finds the first word to occur more than once in a string

Whiteboard Process

image

Approach & Efficiency

  • time: O(1)
  • space O(1)

Solution:

  • repeated_word(str): that takes an argument a str and return the first duplicate value