Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Readable Solution

arcfn fud

Apr 26, 2024

class Solution: def remove(self, arr): writerIndex = 0 for readerIndex in range(0, len(arr)): if arr[readerIndex] != arr[writerIndex]: writerIndex += 1 arr[writerIndex] = arr[readerIndex] return writerIndex + 1

0

0

Comments
Comments

On this page

Problem Statement

Try it yourself