Preguntas de entrevistas para Lead developer

3 K

Preguntas de entrevista para Lead Developer compartidas por los candidatos

Preguntas de entrevista principales

Ordenar: Relevancia|Popular|Fecha
EPAM Systems
Se le preguntó a Lead Java Developer…22 de mayo de 2017

Coding test: 1. Given a string, find out if there's repeat characters in it. 2. SQL. Given a Customer table and a Payment table (with Customer ID as primary and foreign key), write a query to output a list of customers who have not paid their bills in the last 3 months.

15 respuestas

Did well on the first Java coding test. Solution using Hashset. Not so well on the SQL query. Able to give a query, but a few errors in it I am sure. Also there was a second questions regarding the SQL query, which we didn't have time to get to. So that was another bad thing. I am pretty sure I did not pass. But good learning experience. Menos

import java.util.*; public class test { public static void main(String[] args) { String str = "abdc"; char[] arr = str.toCharArray(); HashSet set = new HashSet(); for (char i : arr ) { set.add(i); } if((set.size()) == (arr.length)) System.out.println("unique character"); else System.out.println("repetition"); } } Menos

No

Mostrar más respuestas
Tyler Technologies

three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they were, the cannibals would eat the missionaries.) The boat cannot cross the river by itself with no people on board. Move all missionaries and cannibals from one river bank to the other.

3 respuestas

That is an incorrect answer. The boat can not hold more than 2. 1M + 1C take the boat and leave 1C on the other side. 1M (left in the boat) goes back and takes 1C. They cross and 1M stays on the other side. 1C (left in the boat) goes back and takes 1M and drops him off on the other side. 1C (left in the boat) goes back and takes the last 1M and drops him off on the other side. 1C (left in the boat) goes back and takes the last 1C and cross the river. Menos

The correct answer to this question is a bit more complicated than the ones currently posted. DeerJohn's answer fails to solve the problem because it violates the constraints of the boat. Henry's answer unfortunately leaves us with a situation where 1 Missionary and 1 Cannibal are in a boat together headed to the opposite shore where 1 cannibal is already waiting. Thus when they arrive the two cannibals eat the outnumbered missionary in the boat. The boat does not provide any sort of invincibility or defense. To correctly solve this problem it will take 11 total trips from bank to bank. I'll try and diagram it below, A trip will be defined as any attempt to cross the river. START: BANK1: mmm ccc | BOAT: | BANK2: TRIP1(crossing): BANK1: mm cc | BOAT: mc | BANK2: TRIP2(returning): BANK1: mm cc | BOAT: m | BANK2: c TRIP3(crossing): BANK1: mmm | BOAT: cc | BANK2: c TRIP4(returning): BANK1: mmm | BOAT: c | BANK2: cc TRIP5(crossing): BANK1: m c | BOAT: mm | BANK2: cc TRIP6(returning): BANK1: m c | BOAT: mc | BANK2: m c TRIP7(crossing): BANK1: cc | BOAT: mm | BANK2: m c TRIP8(returning): BANK1: cc | BOAT: c | BANK2: mmm TRIP9(crossing): BANK1: c | BOAT: cc | BANK2: mmm TRIP10(returning): BANK1: c | BOAT: c | BANK2: mmm c TRIP11(crossing): BANK1: | BOAT: cc | BANK2: mmm c END: BANK1: | BOAT: | BANK2: mmm ccc Menos

All 3 missionaries should go across, leaving two on the opposite bank. One missionary returns to retrieve 2 cannibals, leaving then with the two missionaries already on the opposite bank, then returns for the last cannibal. Menos

Applied Materials

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 respuestas

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) Menos

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); } Menos

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); } Menos

Cisco Systems

2. Swap the two values (int A=5 and int B=3), w/o using a 3rd attribute(so you cant use the 3rd attribute to store the value as a temporary storage).

3 respuestas

Both previous answers are theoretically correct, yet buggy. 'A' could potentially overflow due to (A+B) or (A*B). Therefore, the best method is to use the 'xor' operator. A ^= B; B ^= A; A ^= B; Menos

first you do A= A*B, next you divide B=A/B and finally A= A/B.

A = A+B B = A-B A = A-B

Booking.com

Given an array of numbers, e.g. [5,0,9,2,5,5,5] - return all the consecutive numbers that add up to N.

3 respuestas

There were two followup questions to this. a) What if there are lot of zeros after the sum is 10. E.g. 505000000 - what would it return? b) what if we allow negative numbers. For example 5,5,-6,6,0,0 We also discussed its time complexity. Menos

The following should work. cheers! public int[] calculateSumSet(int[] inputArray, int desiredSum) { for (int stratingIndex = 0; stratingIndex < inputArray.length; stratingIndex++) { int sumOfSubArray = -1; int endingIndex = stratingIndex; do { sumOfSubArray = getSum(inputArray, stratingIndex, endingIndex); if (desiredSum == sumOfSubArray) { return subArray(inputArray, stratingIndex, endingIndex); } endingIndex++; } while (endingIndex < inputArray.length);//&& sumOfSubArray < desiredSum } return null; } private int getSum(int[] inputArray, int stratingIndex, int endingIndex) { int retValue = 0; for (int i = stratingIndex; i <= endingIndex; i++) { retValue += inputArray[i]; } return retValue; } private int[] subArray(int[] inputArray, int stratingIndex, int endingIndex) { int[] retValue = new int[endingIndex - stratingIndex + 1]; int j = 0; for (int i = stratingIndex; i <= endingIndex; i++) { retValue[j] = inputArray[i]; j++; } return retValue; } Menos

Hi, What made you say that "Talking about TDD in a company where tests virtually do not exist is a big no-no"? Did you talk about it in general or did you make your presentation on/about TDD? What do you recommend for future candidates? --prospective candidate Menos

NETGEAR

So how do you implement workflow?

3 respuestas

Me: So to implement workflow, you need to actually map out the "work flow" ... NO. NO. NO. How do you implement it? Me: Well, you do realize that you have to map out the workflow, right? Have you used the WorkFlow Designer? It leverages Microsoft Visio to map out the "work flow" as a diagram.... Yes, I know that but how do you make it work? Me: Well, once you map the "work flow" then you save it and you have to code C# fragments that you attach to each node in the diagram that performs a specific action. So the actual diagram is key to the workflow implementation, because the rest is just C# fragments.... Ok. ok. ok. Next question. It turns out that he is a Java guy, like 75% of Silicon Valley and as soon as you say C# they "tune out" and do not want to hear more. Menos

The point was to highlight the lack of diversity and how unwelcome I felt after being asked to come in for an interview, but if you must know. I include India when I say asian, but maybe some prefer differentiating asian, south asian, etc. Just gets silly. Anyway, interviewer #1 was probably Chinese female from the name. Interviewer #2 was Indian male. Interviewer #2 was definitely Chinese male. As for the people I saw in the cubicles, they were all Indian males from the people I saw conferencing together in cubicles, and the other 2 people interviewing were Indian females. Explicit enough detail for you? I really enjoy walking around the Google campus. VMware is also another GREAT campus. So much diversity in terms of age, race, etc although I know those campuses have a TON of students interning and working temporarily there, so they might not be permanent staff. Menos

Are you including Indians as Asian? Were there a lot of Indians? Or mix?

Booking.com

Given a set of components like A,B,C,D... And their ordered dependencies like A -> B,C B -> C C -> D find the dependencies for any given component "X".

3 respuestas

The question involved setting up a data structure and algorithm to solve this. I used list of lists and made a recursive solution. Menos

By assuming there will be no circular dependencies, one can setup a 2d matrix of dependencies then perform a dfs/bfs starting from the input X node and flag all the dependent components. Menos

I can think of 2 approaches 1. Make lists and recurse till u reach X; return the success/fail status and add to a list of dependencies iff the status was a success 2. Make a directed graph out of this (Iff there are no circular dependencies). Then perhaps do a topological sort (use DFS/BFS). All the vertices visited before X are dependencies (2 data structures used here: Graph and Stack) Another possible solution: Make a directed graph, reverse all edges so that all incoming edges are outgoing. Then do a DFS/BFS to figure out which parts of the graph are accessible from X Menos

WhizAI

1) Update the existing map without creating another map. 2) Write code to show the deadlock. 3) Find the maximum number from the given array. 4) Write the signature of service returning all the records from the provided table. 5) Explain about the Json format.

3 respuestas

I also had the similar experience here, all other people seem to be normal but this HR was some sick person, so assume that HR policies will be similar here. I am happy to decide that I will not be going here. Menos

Thanks for the feedback, to me also HR gave the same dialogue about salary. And I decided to try for some other organization rather such fake company. I also believe the ratings given here 4.6 is fake. Menos

It is a company of fraud people, so better to have distance with this company...

Golden Hippo

"Do you have any Anxiety disorders or other Mental Health issues?"

2 respuestas

It's very sad to me that VPs run the show there. Everyone is under experienced and it shows in their interview decorum. I believe they will be in legal trouble sooner than later. Menos

This is the first time I have ever witnessed this happen in an interview and I didn't quite know how to respond. It was even more shocking to have such a blatant violation of the ADA coming from someone with a VP proceeding their name. I would suggest that anyone receiving such questions during any interview, calmly excuse themselfs from the interview to pursue a conversation with HR immediately. Additionally, you may wish to consider retaining a Lawyer. Menos

Ticketmaster

Given a paragraph of English words, write a function returning the least used word in the paragraph.

2 respuestas

use split function in the paragraph to split each line into an array by splitting with space. Write a hashmap function, then compare the counts of all the hashmap, who so ever count is least return the key of that count value. Hence we have the least word in the paragraph used Menos

The key in these questions is to cover the fundamentals, and be ready for the back-and-forth with the interviewer. Might be worth doing a mock interview with one of the Ticketmaster or ex-Ticketmaster Lead Software Engineer experts on Prepfully? They give real-world practice and guidance, which is pretty helpful. prepfully.com/practice-interviews Menos

Viendo 1 - 10 de 2638 preguntas de entrevistas

Consultar preguntas de entrevista para empleos similares