Intuition
Join arrays into strings, compare if they are true and return.
Code
Python3
Big O Analysis
-
Runtime
The runtime complexity here is since we are iterating the string once.
-
Memory
The memory usage is since we are not using any extra data structure. It depends actually, since we are using the
join
function someone would say that it memory - sincejoin
returns a string.
— A