employer cover photo
employer logo
employer logo

Intrepid Pursuits

Is this your company?

Intrepid Pursuits Interview Question

Reverse an array without using the reverse method, without using a second array, and without duplicating any of the values.

Interview Answers

Anonymous

Feb 15, 2018

def reverseNoDuplication(s): m = len(s) for i in range(m - 1, -1, -1): if s[i] not in s[m:]: s.append(s[i]) return s[m:]

Anonymous

Aug 7, 2018

var arr = [1,2,3,4,5,6] for i in 0..

Anonymous

Aug 7, 2018

var arr = [1,2,3,4,5,6] for i in 0..

Anonymous

Aug 7, 2018

var arr = [1,2,3,4,5,6] for i in 0..