Senior lead engineer Interview Questions | Glassdoor.co.in

Senior lead engineer Interview Questions

92

senior lead engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Input is a string like "AAAAABBCCAA" and it should print "5A2B2C2A". 5 being the continuous number of occurance for character 'A'. Same is with other characters also.

3 Answers

let string:String = "AAAAABBBVVVCVCAA" let characters = Array(string) var counter:Int = 1 var newArray:[String] = [String]() let lastCount = characters.count - 1 for count in 0...(characters.count - 2) { if characters[count] == characters[count + 1] { counter = counter + 1; }else { newArray.append("\(counter)\(characters[count])") counter = 1 } if lastCount == count + 1 { newArray.append("\(counter)\(characters[count])") } } print(newArray)

public static void main(String[] args) { String s = "AAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBCC"; Set set = new HashSet(); char b = 0; int count = 1; String newString = ""; for (int i = 0; i 0) { b = s.charAt(i - 1); } char c = s.charAt(i); if (!set.add(c)) { count++; } else { if (b != 0) { newString = newString + b + count; count = 1; } } } newString = newString + b + count; System.out.println(newString); }

public static void main(String[] args) { String s = "AAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBCC"; Set set = new HashSet(); char b = 0; int count = 1; String newString = ""; for (int i = 0; i 0) { b = s.charAt(i - 1); } char c = s.charAt(i); if (!set.add(c)) { count++; } else { if (b != 0) { newString = newString + b + count; count = 1; } } } newString = newString + b + count; System.out.println(newString); }

- How do you test a data pipeline for performance and accuracy - Code a treemap and write testcases to test the same What I liked is even though I did not do the coding question well, interviewer helped me explain my strength and guided me for interviews with other companies.

2 Answers

What are the different MySql engine?

1 Answer

Which JavaScript framework do you prefer to develop a new product, Angular or React?

1 Answer

Bracket balance checking.

1 Answer

Project Discussion

1 Answer

He asked me to fetch only array values from associave array

1 Answer

He asked me to swipe 2 numbers w/o using the third variable: $a = 10 $b = 5;

1 Answer

How we do routing in codeIgniter? Write the formula.

1 Answer

Digital design and SI basics

1 Answer
110 of 92 Interview Questions