Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (string s in set1){
- dictionary.add(s) // O(1)
- // O(n) for time and space
- }
- foreach(string s in set2){
- dictionary.contains(s) // O(1)
- // O(n) for time and space
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement