# 31

Apprentice Web Developer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date
Web Developer Apprentice was asked...April 14, 2017

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

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:] Less

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

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

### Given a base and a height return the area of a triangle.

var base = 15.5 var height = 27.2 func triArea (base: Double, height: Double) -&gt; Double { var area = 0.5*base*height return area } var triangle1 = triArea(base: base, height: height) print("A triangle with base \(base) and height \(height) has an area of \(triangle1)") Less

Could you share what your onsite interview experience was like? What kind of questions should I expect? Less

const triArea=(b,h)=&gt;{return .5*b*h}

### 1. Given a radius, write a function that calculates the area of a circle. 2. Give a string input with a time format of '5:30 PM', change the input to military time.

following is a very naive approach, running time is O(n) def military_time(time): unit = time[-2:] time = time[:-2] hour, minu = time.split(':') if unit == 'AM': if hour == '12': return '00'+':'+minu elif int(hour) &gt; 9: return hour + ':' + minu else: return '0'+hour+':'+minu else: if hour == '12': return hour + ':' + minu else: return str(int(hour)+12) + ':' + minu print(military_time('5:35 pm')) Less

The first problem was very straightforward. I ran into some difficulty in solving the second problem though. I spent a good chunk of time thinking about and verbally explaining a possible solution but then stumbled during the implementation. I stubbed out some of the solutions in comments, then proceeded to code it out. I ended up running out of time and so was told to forward any questions to the hiring manager. Less

### Why do you want to work for Intrepid?

can you elaborate more on your experience? in which stage did you get reject?

### Given n people, find total number of pairs can be formed.

They are looking for recursion.

### Why do you want to work at Intrepid Pursuits?

I replied that I like the variety of a consultancy and that I would do well interacting with clients given my Humanities background. Less

### How do you test api to make sure its correctly working?

Use postman to check the endpoints

### Write a function that works like the javascript .join() method.

Write a function that returns the first duplicate it finds in an array.