Software Developer Interview Questions in Bridgeport, CT | Glassdoor.co.in

Software Developer Interview Questions in Bridgeport, CT, US

47

Software developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Software Developer at AQR Capital Management was asked...

21 Jun 2017
 You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)4 Answers# p^q without using math.pow in O(log(n)) using memoization def p_power_q(p, q): """ p: p is base q: q is exponent """ if q == 0: return 1 elif q == 1: return p negFlag = 0 if q >= 1 if negFlag: return 1 / result return result# Without using modulus def power_no_mod(p, q): """ p: p is base q: q is exponent """ if q == 0: return 1 elif q == 1: return p negFlag = 0 if q >= 1 if negFlag: return 1 / result return result# p^q without using math.pow in O(log(n)) using memoization def p_power_q(p, q): """ p: p is base q: q is exponent """ if q == 0: return 1 elif q == 1: return p negFlag = 0 if q < 0: q = -1 * q negFlag = 1 half = p_power_q(p, q // 2) if q % 2 == 0: result = half * half else: result = p * half * half if negFlag: return 1 / result return resultShow more responses# Without using modulus def power_no_mod(p, q): """ p: p is base q: q is exponent """ if q == 0: return 1 elif q == 1: return p negFlag = 0 if q >= 1 if negFlag: return 1 / result return result

Software Developer at AQR Capital Management was asked...

21 Jun 2017
 You are given an alphanumeric string. Complete the function sortSegments that will segment the string into substrings of consecutive letters or numbers and then sort the substrings. For example, the string "AZQF013452BAB" will result in "AFQZ012345ABB". The input letters will be uppercase and numbers will be between 0 and 9 inclusive.3 Answersimport re def segment_sort(string): segments = re.split('([0-9]+)', string) # Splitting the String into Segments sorted_segments = [''.join(sorted(segment)) for segment in segments] return ''.join(sorted_segments) def main(): string = "AZQF013452BAB" print(segment_sort(string)) if __name__ == '__main__': main()A way to do this without regex is to simply try to convert each string character to an int. In python, doing int("A") will result in a ValueError, so you can just use a try-except ValueError clause, and whenever you switch from a region in which you can or cannot convert to int, you know you are at a splitting point, so just save those indices.not sure for python, but for java, all the char have a integer number associated. You can convert char to int, so if the char is greater than '0' and less than '9', this can be an indicator of integer. Use this check you can find all the integer or alpha sub arrays. For each sub array, either add another sort method to sort the char array, or you can use the char comparator default compare method to sort the array. At last, concatenate all the subarrays to form the output.

15 Dec 2017

Software Developer at Smart Software Solutions was asked...

28 Mar 2018
 Find the area of circle given the input as diameter.. was easy just had to use a double return method 1 AnswerFind the sum of the array given an input. That is if 4 is given add 1+2+3+4 got stuck for like 10 mins but was really close like 90 percent then he said I have seen enough . I think he also said We wont be moving forward from here.. Great Experience though

Software Developer at Bridgewater Associates was asked...

17 Oct 2012
 Tell me about yourself and why should we hire you?1 Answertalked about my background and related exp.

Fulltime Rotation for Software Developer at Gartner was asked...

23 Nov 2014
 They asked puzzle questions like, if you have 5 gallon bucket and a 3 gallon bucket, how do you get 4 gallon of water... I'm not sure if incorrect answer effect your chance of landing the job.1 AnswerFill up the 5 gallon bucket and dump the as much as will fit into the 3 gallon bucket from the 5 gallon bucket, you will be left with 2 gallons in the 5 gallon bucket. Then empty the contents of the 3 gallon bucket and dump the 2 gallons from the 5 gallon bucket into the 3 gallon bucket. A this point the 5 gallon bucket will be empty and the 3 gallon bucket will contain 2 gallons. Fill the 5 gallon bucket up again, and dump from it what will fit into the 3 gallon bucket (1 gallon). You will be left with 4 gallons in the 5 gallon bucket.

Software Developer at AQR Capital Management was asked...

29 Sep 2015
 Given a lot of numbers (each number is inputted one at a time), find and maintain a list of the 100 biggest numbers.1 AnswerUse a min heap that keeps track the minimum value of the numbers you have so far. Once the heap contains 101 numbers, remove the top (minimum value), then "reheapify" by putting the value on the bottom right of the heap to the top, then sift it down.

Senior Software Developer at Bridgewater Associates was asked...

6 May 2015
 Mostly personal questions designed for cultural fit.1 AnswerI answered them as best as I could, but was floored by the rudeness of this person. Although Ray Dalio is a brilliant person and explains the concept of ytransactions very well, I do not think I would ever want to work for him and deal with his contant humiliation. No one deserves such harsh treatment.

Software Developer at AQR Capital Management was asked...

21 Jun 2017
 You are given an integer array n. Complete the function sortIntegers which takes as argument, an integer array n of up to 1 million integers such that 1 <= n_i <= 10 for every element n_i in the array, and returns the sorted array. The sort does not need to occur in-place. Please do not call a standard sorting function like quicksort, you can do better. A sample input is {3, 1, 4, 1, 5, 9, 2, 6, 5} and the corresponding output is {1, 1, 2, 3, 4, 5, 5, 6, 9}. Constraints: i <= 10^9; 1 <= n_i <= 101 AnswerAs we already know the sorting order of the numbers from 1-9. Parse through the array once and keep count of each integer.you will pass through array once.With the counts, you have generate the array. This will take O(n) and 2n space.

Software Developer at REPUCOM was asked...

11 Sep 2017
 Are you familiar with SQL and .NET1 AnswerI had experience with .NET, but no knowledge of SQL
110 of 47 Interview Questions