filmov
tv
Leetcode 205 Isomorphic String

Показать описание
time complex : O(n)
space complex : O(n)
the similar question as to the leetcode 290 word pattern
a difference : "ca" and "ce"; "ca" and "ec" could be validated
because they are the same pattern
create a hashmap to record the character and its mapped character
core code :
return false;
else
return false;
space complex : O(n)
the similar question as to the leetcode 290 word pattern
a difference : "ca" and "ce"; "ca" and "ec" could be validated
because they are the same pattern
create a hashmap to record the character and its mapped character
core code :
return false;
else
return false;