# 5K

Team Lead interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date

### They wanted to know if I was familiar with the entire procurement process and if I could bring more systematic procedure to their procurement process.

Meet online meetings code for the information

Good learn and devlop every challenge and fect

Learn to all process that's improv to our work

### "In case you won't qualify for the team lead position you applied for, are you okay if we hire you as agent?"

yes, cause i look for a job, i"m not looking for a position. to start in any job everybody start in above position before they overcome the high position, that they want. Less

Are you high?

"I'm sorry, no, it is not okay."

Sporta

Cricket

No

### Most difficult question is of Salary expectations.

We can never get what we want.

20k

Its depends on company norms also consider my experience and knowledge if meet the market criteria i can go with that Less

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

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. Less

The following should work. cheers! public int[] calculateSumSet(int[] inputArray, int desiredSum) { for (int stratingIndex = 0; stratingIndex &lt; 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 &lt; inputArray.length);//&amp;&amp; sumOfSubArray &lt; desiredSum } return null; } private int getSum(int[] inputArray, int stratingIndex, int endingIndex) { int retValue = 0; for (int i = stratingIndex; i &lt;= 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 &lt;= endingIndex; i++) { retValue[j] = inputArray[i]; j++; } return retValue; } Less

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 Less

### 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.

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. Less

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 Less

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. Less

### Introduction All previous company experience All previous Project Experience Long term goal Commitment towards work and job responsibilities

I answered nearly all questions that is why I got selected

### What was the most difficult situation you faced before and how did you act

If Someone your Caleague not listening and not achieving his target.. You have to spend some time with your Caleague and work together.. After that he understand self.. Less

If someone ur Caleague not leation and doing achieving target.. U have to spend some to ur Caleague and work with him next he understand.... Less

I discribed the situation difficulty and explained the solutions and how I acted till I reached a pleasent feedback Less

### Is it possible to swap two registers without using a third one?

Add two variables and assign the value into First variable. Subtract the Second value with the result Value. and assign to Second variable. Subtract the Result of First Variable With Result of Second Variable and Assign to First Variable. Example: int a=5,b=10;a=a+b; b=a-b; a=a-b; Less

When we talk of registers XORing is the operation that we can perform. Say a = 5 ; b = 10 a = a XOR b; // 5 XOR 10 is 15 so "a = 15" b = a XOR b // 15 XOR 10 is 5 so "b = 5" a = a XOR b // 15 XOR 5 is 10 so "a = 10" So in the end a = 10 and b = 5 Less

Using XOR is probably better than using addition as addition might cause overflow. Less