We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Why changing to int[] make it faster? I changed the code and all the tests passed. I wonder why. Is it because intializing a list is slower than intializing an array? Or list.get() is slower than array[index]?
Frequency Queries
You are viewing a single comment's thread. Return to all comments →
Why changing to int[] make it faster? I changed the code and all the tests passed. I wonder why. Is it because intializing a list is slower than intializing an array? Or list.get() is slower than array[index]?