Skip to main content

๐ŸŽฎ Arrays & Strings (Practice)

Companion to the Arrays & Strings guide. Practice in-place array manipulation โ€” a core interview skill. Edit and run the code right here โ€” it executes in your browser.

๐Ÿ Your turnโ€‹

Loading editorโ€ฆ

๐Ÿง  Challenge yourselfโ€‹

  1. Do it with slicing in one line โ€” then explain why the reverse trick is O(1) space.
  2. Move all zeros to the end while keeping order of non-zeros.
  3. Find the longest common prefix of a list of strings.

Continue the learning path โ†’ Big O Complexity