Software Development Engineer Interview Questions in London, UK | Glassdoor

Software Development Engineer Interview Questions in London, UK

94

Software development engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

The questions were not very difficult but you really need to have all the concepts crystal-clear and be ready to apply them successfully. One of the questions was "how to count the letters in this string:" "The quick brown fox jumps over the lazy dog";

12 Answers

public static int countWords(String str){ if(str == null || str.isEmpty()) return 0; int count = 0; for(int e = 0; e < str.length(); e++){ if(str.charAt(e) != ' '){ count++; while(str.charAt(e) != ' ' && e < str.length()-1){ e++; } }else{ e++; } } return count; }

Sorry, the above version has an error!!!!!!!!!!!!!!!!!!!!!!!! concider this one: public static int countWords(String str){ if(str == null || str.isEmpty()) return 0; int count = 0; for(int e = 0; e < str.length(); e++){ if(str.charAt(e) != ' '){ count++; while(str.charAt(e) != ' ' && e < str.length()-1){ e++; } } } return count; }

# That's why i love Python: len(re.findall('[a-zA-Z]', s))

Asked question: Using an already implemented method Rand5() that generates a random integer between the ranges 1-5 uniformly. Using this method, implement a a new method that returns a random integer in the range 1-7 uniformly, i.e. Rand7(). Basically this is Rejection Sampling Algorithm. See http://leetcode.com/2010/11/rejection-sampling.html

2 Answers

Are you married? Do you have any kids? Where do you live?

2 Answers

Create (describe) function Count number of "1" bits in binary representation of a positive integer

1 Answer

1. How to achieve automatic type conversion from type X to type Y? a. X can define the member function operator Y() b. a) or b) can be used c. Y can define the constructor Y(const X&) d. none of the above 2. class Coordinate{ int x; int y; public: Coordinate(int a=0, int b=0) { x=a; y=b; }; }; What are the values for the following object: Coordinate point(10); a. x=10,y=0 b. x=0,y=10 c. x=10,y=10 d. x=0,y=0 3. What type of argument can the following function take : Void foo(); a. any number or type of arguments b. a character c. an integer d. no an integer argument of any type 4. Consider the following function declarations in a header file: void doit(char *, int); int doit(char *) ; float doit(float, float) ; Which of the following declarations cannot follow in the same header: a. void doit(int, char *); b. int doit(int) ; c. float doit(char *) ; d. int doit(int, int) ;

3 Answers

Write a function that takes a position (x,y) in a go game graph and returns a boolean telling if this position contains a white or black piece and if this piece is trapped or not.

1 Answer

Explain your roles and responsibilities

1 Answer

Design a message board (such as 9 gag or similar)

I faced following qns: 1. Array concept Input : Array values are : 2 5 7 8 Target value: 7 It is asked to get the target value only if the array values satisfies that first element is lesser than the next element. Expected output to print the values of array which satisfies to get target value: 2 5 Second qn: string manipulation Input: Handmade Milk Expected output: Handmilk