# 2 mil

Preguntas de entrevista para Desarrollador De Software I compartidas por los candidatos

## Principales preguntas de entrevista

Ordenar: Relevancia|Popular|Fecha
A un Software Engineer I le preguntaron...16 de junio de 2012

### Puzzle question: A Floating ship contains 1 stone , If I drop that stone in sea,,What will happen with water level??? Is it increase or decrease n why??

7 respuestas

The amount of water displaced is equal to the mass of the object immersed. Since the net mass of objects in water is the same, the same amount of water needs to be displaced. Hence no change in the water level. Menos

It solely depends upon the density of stone. If density of stone is higher than boat material then it will increase the water level .. Otherwise decrease Menos

nothing will happen

Mostrar más respuestas

### 1. Find vowels from the given string in the first round. 2. They provided small small c# programs for each sessions

5 respuestas

#include int main(void) { char input[500], chars[5] = {'a','e','i','o','u'}; int i, len=0, vow[5]={0}; gets(input); while(input[len] != '\0') len++; if(len %d\n",chars[i],vow[i]); } return 0; } Menos

hey what the hack, why my answer not showing properly. it merge my code and sunk 3-4 lines of code. see line 10. ??? what am i suppose to do now!!! Menos

please tell me what type question they will ask in programming round as well as aptitude Menos

Mostrar más respuestas

### What is systems engineering?

4 respuestas

Systemically approaching a problems, and systematically arriving at solutions.

Coordinating a complex project across different disciplines

WOW...How many lines of code have you programmed?? They ask questions like this? I'd tell him that I program millions of lines of "Hello World" everyday. Really some nonsense question. Menos

Mostrar más respuestas

### Assume you have a binary number 00110010, you apply some function on it and the number changes to some random number 10100011. Write a function to determine which numbers flipped from 0 to 1 and which bits flipped from 1 to 0. (You will have to write 2 different functions for 0 to 1 and 1 to 0).

4 respuestas

From 0 to 1, 00110010 XOR 11111111 =&gt; 11001101 then &amp; 10100011 =&gt; 10000001 From 1 to 0, 00110010 OR 10100011 =&gt; 10110011 then XOR 10100011 =&gt; 00010000 Menos

// 1. c = a XOR b --&gt; gives the number of bits that need to be flipped to change a to b // 2. count number of bits set in c static int countSetBits( int n) { int count = 0; while(n&gt;0) { count = count+ (n &amp; 1); // ie 1001 &amp;&amp; 0001 = 1 ie count = 1 at first loop n &gt;&gt;= 1; //right shift by 1 ie 9 =&gt; 4 =&gt; 2 =&gt; 1 } return count; } //if you want to know how many bits need to be changed from reaching a to b // 1. c = a XOR b // 2. count number of bits set in c static int calculateBitsFlipped(int a, int b){ int c = 0; c = a ^ b; return countSetBits(c); } Menos

Wasabi can you please explain the logic?

Mostrar más respuestas

### 1. How many bits in a byte? 2. What's the integral of velocity?

4 respuestas

For number 2, the integral of velocity is the total distance traveled. The derivative is acceleration. Menos

there are 8 bits in a byte The indefinite integral is the distance traveled.

1. 8 2. Acceleration is the "derivative" of velocity with respect to time, and the second derivative of distance or displacement with respect to time. This means that the "integral" of velocity is distance. The first passion to answer was confusing integral and derivative. Menos

Mostrar más respuestas

### Given a string, check for balanced parenthesis

4 respuestas

Did anyone hear back?

i still didn't get result

I got a rejection call a week after I interviewed :(

Mostrar más respuestas

### How would you check if a string is a palindrome recursively?

3 respuestas

bool IsPalindrome(string&amp; String){ if(String=="")return true; if(String[0]==String[String.size()]){ IsPalindrome(String.substr(1,String.size()-2)); }else{ return false; } Menos

#include #include #include #include bool check(char* arr, int front, int back) { printf("front [%d, %c], back[%d, %c]\n", front, arr[front], back, arr[back]); if (front &lt; back) { if (tolower(arr[front]) == tolower(arr[back])) { return check(arr, ++front, --back); } else { return false; } } else { return true; } } int main(int argc, char**argv) { if (2 != argc) { printf("provide input string to test\n"); exit(1); } printf ("Is %s a palindrome? %s\n", argv[1], check(argv[1], 0, strlen(argv[1]) - 1) ? "yes" : "no"); } Menos

(define (palindrome w) (if (&lt;= (count w) 1) #t (if (eq? (first w) (last w)) (palindrome (bl (bf w))) #f))) ; Menos

### Prove that limit theta tends to zero sin(theta) / (theta) tends to one?

3 respuestas

It requires the understanding of trigonometry and circle geometry.

Simply use L'Hôpital's rule, it's Calculus I.

Use taylor expansion

### Did ask some basic programming questions, ex. Have you ever used UML?

3 respuestas

State diagrams are an example of UML.

So, you seem like flowcharts?

Yes.

### write an algorithm to determine is "happy" ... a number is happy if the sum of the square of the digits ever equals one. An example of a happy number is 19: 1^2 + 9^2 = 82 8^2 + 2^2 = 68 6^2 + 8^2 = 100 1^2 + 0^2 + 0^2 = 1 If it is not happy then it will eventually hit repeat back to a number that it already saw

3 respuestas

function happyNum (n) { var sum=0; var n2Arr=(""+n).split(''); console.log(n2Arr); for(var i in n2Arr){ sum=n2Arr[i]*n2Arr[i]+sum; } if(sum &gt; 1){ sum=happyNum(sum); } return sum; } console.log(happyNum(17)); Menos

LOL- TERRIBLE Interview Question. Has no use in the real world. The good devs will be so bored they wont even attempt the math Menos

import java.util.*; public class Solution { public static void main(String[] args) { for(int i = 1; i results = new HashSet(); int result = 0; while(true) { while(num &gt; 0) { int digit = num % 10; digit *= digit; result += digit; num /= 10; } if(result == 1) return true; if(results.contains(result)) return false; results.add(result); num = result; result = 0; } } } Menos

Viendo 1-10 de 1529 preguntas de entrevista