education Interview Questions | Glassdoor.co.in

# Companies matching "education"

NY State Office of Cultural Education Interviews

www.oce.nysed.gov /  HQ: Albany, NY

0 Interviews

Not Yet Rated

NY Office of Higher Education Interviews

www.highered.nysed.gov /  HQ: Albany, NY

0 Interviews

Not Yet Rated

## education Interview Questions

Sort: RelevancePopular Date

5 Jul 2012

### Software Development Engineer at Microsoft was asked...

12 Jul 2013
 out of 25 horses select the fastest three in minimum number of races where in each race there would be exactly five horses.10 Answers6 races i thinkit could be 6 races... first five races taking 5 horses each,and then the 6th ace taking the 1st horse of each of the previous race,den select the fastest three among them.would be 5 races if a stop watch is given..... however solutions given before are wrong since the horse coming 2nd in the first race might be faster than the horses that come first in the subsequent race :) hence we have to assume that a timer is providedShow more responsesumesh no timer has been provided and it would be 7 races :)11 races First 5 races taking 5 horses in each race. Next 5 races taking in each race horses which have come first, horses which have come second, third, fourth and fifth....... Final 11th race out of 5 which have won in second set of races to find fastest 36 Race would be wrong answer. What if in one group all the 5 horses are fastest of all others. Then from first round of 5 races we might lose those 2nd and 3rd ones. My answer is also 11 Races.Round one - 5 Races -------------------- Including all 25 horses. 5 each race. Left with -> 15 horses [Take 1st,2nd & 3rd from each race. Which would be total of 5*3=15 horses.] Round two - 3 Races [ Grouping any 5 of 15 horses left] ------------------- Left with -> 9 horses [Take 1st,2nd & 3rd from each race. which would be total of 3*3=9 horses.] Round three - 1 Race. ---------------- Take any 5 horses of 9 horses left Left with -> 7 horses 3 (1st 2nd and 3rd) + 4 (remaining ones) = 7 horses Round four - 1 Race. ---------------- Take any 5 out of 7 Left with -> 5 Round Five - 1 Race ---------- Race of 5 horses left7 races: Split the 25 into 5 groups and make them race, this would be 5 races. Take the fastest horse of each group and make them race (6th race). Let's label the initial group of the top 3 horses of the 6th as a, b, c. The possible candidate for the 3 fastest are: a[1], a[2], a[3], b[1], b[2], c[1] We just need one last race to determine the top, the race would be between a[2], a[3], b[1], b[2], c[1]. The final result is a[1] then the top 2 of the 7th race.Easy: Correct answer is 11 but much easier method: 1. One race among 5 horses to find the fastest 3. 20 horses left not raced yet. 2. Now keep the 3 fastest horses you found and add two other horses out of 20 horses left to the race, again select the fastest 3. 3. Keep doing this for all 20 horses by selecting 2 of the horses left to race against the fastest 3 always. 1 race (to find the fastest 3) + 10 races (20/2 races to test all other 20 horses) = 11 racesConstant Time - 7 Races 5 Races among 5 each. 6th Race for all third place holders 7th Race for Winner of sixth race +two people who defeated him in 1st race + two people who defeated the second place winner in 6th race. Best Case - 6 Races (3 place winner of 1st race against other 20 and he wins all the time) Worst Case - 11 Races( Make the fastest 3 of each race run against the other 2 each time)

### Intern at Texas Instruments was asked...

7 Feb 2013
 Use 12V supply to provide 2V supply 5 AnswersI have answered it but he was not satisfied,I told 1.voltage divider,2.zener diode,3. useMOS as a resistanceThere is a TI IC named TL783, which is a voltage regulator ICYou could use a Buck converter/ Buck-Boost converterShow more responsesHe supposed me to use such a ckt which is very small and dissipates low power.I think the interviewer want you to answer like LDO, or Buck. And then maybe they could ask you about the difference between them, I mean the advantage and disadvantage, and how to design it. like the efficiency...

### Software Development Engineer In Test (SDET) at Microsoft was asked...

26 May 2013
 Consider a stack of N number of cards which are piled up and in facing down. Each card has a unique number from the range 1 to N. The card is stacked in such a way that it exhibits the following behavior: Take the first card and put it under the stack without revealing. Now the next card on the top will have the number 1 on it. Next take 2 cards one after the other and put is under the stack without revealing. Yes you guessed it right - the next card on the top will reveal a value of 2. This goes on. Eg. for such a series : 9,1,8,5,2,4,7,6,3,10 [for N=10] Write a program to generate such a series for a given N number of cards so that this behavior can be exercised.8 AnswersPossible implementation in C++ -------------------------------------------------- int CounterStep(int counter,int N); int LocatePosition(int *cards,int N, int startPointer,int value); using namespace std; void main() { int cards[20]; int N=20; int POS = 0,TOP = 0; // Initializing everything to zero for(int i=0;iWritten in Python although it can be re-written in C/C++ if required. def generateSpecialSeries(numberOfCards): specialSeries = [] if numberOfCards > 0: for i in range(numberOfCards, 0, -1): specialSeries.append(i) currentSpecialElement = 1 currentIndex = 1 while currentIndex < numberOfCards: indexOfCurrentSpecialElement = numberOfCards - currentSpecialElement specialSeries[currentIndex], specialSeries[indexOfCurrentSpecialElement] = specialSeries[indexOfCurrentSpecialElement], specialSeries[currentIndex] currentSpecialElement += 1 currentIndex += currentSpecialElement + 1 return specialSeries specialSeries = generateSpecialSeries(50) print specialSeries specialElement = 1 specialElementSum = 1 currentIndex = 1 while currentIndex < 50: print specialSeries[currentIndex] == specialElement specialElement += 1 specialElementSum += specialElement currentIndex += specialElement + 1// Short and simple C++ algorithm #define N 10 void compute(int stack[]) // Make sure N elements are allocated { int j=0; for(int i=0; iShow more responses#include using namespace std; int main(int argc,char **argv){ int count=20; int array[20]; for(int i=0;i>a; return 0; }Java implementation public class App { public static void main(String[] args) { String arr[] = new String[10]; int pointer = 0; for (int valueToPlace = 1; valueToPlace <= arr.length; valueToPlace++) { for (int x = 1; x <= valueToPlace; x++) { if (pointer == arr.length - 1) pointer = 0; else pointer++; if (arr[pointer] != null) x--; } System.out.println("Placing " + valueToPlace + " at index " + pointer); arr[pointer] = valueToPlace + ""; while (arr[pointer] != null && valueToPlace != arr.length) { if (pointer == arr.length - 1) pointer = 0; else pointer++; } } for (String str : arr) { System.out.print(str + ", "); } } }The algorithm used is: For each number n (ranging from 1 to 10), we have to skip n places in the array. And then put number n at that position. The catch in the program is that we can skip only, not occupied places (the array places where value is 0 by default). Also, when we reach the end of the array, we have to move back to beginning of array (similar to cards being kept at the bottom of the pile of cards.) Here, a variable 'pos' is used to store the final position of any element. Initially, pos is at 0. The skip() takes the array, the current value of pos and the number of skips to be made. For example, for n=1, the values passed to skip() would be: pos=0, n=1. This means that we have to skip 1 place starting from index 0. Similarly, for n=2, pos=1. This means we have to skip 2 places starting from index 1. Java Implementation: public class StackOfCards { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[] arr = new int[10]; int pos=0; for(int n=1;n0){ if(arr[pos]==0){ //reduce the number of skips to be made n--; } pos++; //if end of array is reached, take pos back to beginning if(pos==10){ pos=0; } } // keep incrementing pos until a not occupied index is reached. while(arr[pos]!=0){ pos++; } return pos; } }Here is C# Code... namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int n = 36; int[] series = new int[n]; int LargestNumber = n; int SmallestNumber = 1, temp = 1, i; bool putLargeNumber = true; for (i= 0; i 0)) { series[i] = LargestNumber; Console.Write("{0} ", series[i]); LargestNumber = LargestNumber - 1; putLargeNumber = false; temp--; } else { series[i] = SmallestNumber; Console.Write("{0} ", series[i]); SmallestNumber += 1; putLargeNumber = true; temp = SmallestNumber; } } } } }import java.util.HashMap; import java.util.HashSet; import java.util.Scanner; import java.util.Stack; public class MSQuestion1 { static int counter =1; public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int n =in.nextInt(); // x 1 x1 x2 2 x3 x4 x5 3 x6 int[] arr = new int[n]; int f = 0; while(f0)) { arr[f]=counter; counter++; } f++; } for(int i=0;i

### Intern at Microsoft was asked...

21 Aug 2010
 You have a machine that can create anything. You just have to specify the details, and voila, it will give you the output. Design test cases for such a machine4 AnswersI looked for fringe cases. As in, one test case was to test the level of intelligence of the machine, as in can it produce another copy of itself. Second test case i suggested was, whether machine could understand vague instructions, and much will it assume on its own, take any random stuff - like a coffee machine with a blueray drive ( sounds weird, huh)I ll give the details of the machine to the same machine and ask the machine to prepare the test case....@Hemanth: but this will never tell you if the machine is working correctly, which is your task at hand ... as in, if the machine is not working correctly, it may give you wrong test cases, which may succeed (by chance) ... (open for argument...)Show more responses*Hemnath

### Associate Consultant at Microsoft was asked...

23 May 2011
 Number Series : 1 6 12 13 19 _4 Answers31Answer: 24 These are pins which are grounded. See: http://www.datasheetcatalog.org/datasheet/calmicro/PACKBMUR.pdf31 difference of any instant two (right minus left) is kept in the alternate left place. so 31 (?) 19 =12Show more responses31

### Software Development Engineer at Microsoft was asked...

26 May 2012
 Find count of unique characters in a given string4 AnswersWhat kind of characters in the string? Assuming ASCII characters, total 256. Array should be a good choose. int uniqueCount(string str){ if(str.size()<2) return str.size(); int charNum[256]={0}; // initialized to zero //counting concurrency for(int i=0; ihere are two ways of attacking this: (1) sort the chars, then walk the list incrementing a count any time you hit a different char (2) take advantage of the fact that there are at most 256 ASCII characters, with values 0 to 255, so build a 256 sized array to hold all possible chars, then as you walk the list, increment the corresponding array entry holding a matching char. first approach: /* sort the string */ for (int i=0; ipublic void counter(String g) { int count; for (int i = 'a' ; i<='z' ; i++){ count = 0; for (int a = 0; aShow more responsesUsing single iteration :) ..... int map[256]={0}; //initialise map to 0 int count=0; string a="abcabnaabcabaccacbbbqf"; for(int i=0;i

### Software Development Engineer I at Microsoft was asked...

17 Aug 2012
 You've a singly linked list where every node in the list has a field "random" which points to other node in the same list. Write a function to clone this list (create a new copy of the same). Don't use extra space (just the pointer variables are fine).3 AnswersIf any problem has the condition, "Don't use extra space", it in-directly means that, you can modify the list. Clarify it. It took some time for me to clarify that I'm allowed to modify the source list.didnt get the point can you please elaborate ???There is a singly linked list: A -> B -> C -> D -> E Each node has another variable called "random". It points to another node in the same list. For example, the "random" variable in the node "B", points to some other node in this list. Say, "E". Now the question is to clone this list. Got it?!

### Software Development Engineer In Test (SDET) at Microsoft was asked...

24 Mar 2012
 Sorting Algorithms Optimizations from 2 loops to just 1 loop5 AnswersNC#include #include using namespace std; int main() { int list[10] = {5, 4, 3, 6, 7, 1, 2, 9, 8, 10}; for (int i=0; i= 0 && next list[next]) { int temp = list[i]; list[i] = list[next]; list[next] = temp; next--; } else next++; } } for (int i=0; i<10; i++) { cout << list[i] << " "; } return 0; }you still have two loops #include #include using namespace std; int main() { int list[10] = {5, 4, 3, 6, 7, 1, 2, 9, 8, 10}; for (int i=0;j=i; i<10; i++;j++) { I can't remember, but you use two indices within one loop to sort using bubble sort } for (int i=0; i<10; i++) { cout << list[i] << " "; } return 0; }Show more responsesuse quicksort. it has runtime of O(n.logn), or heapsort. they both use one for loop and a heap/stackstatic void Main(string[] args) { int[] arr = new int[] { 8, 9, 6, 7, 4, 5, 2, 3, 1 }; int i = 0; bool swapped = true; while (swapped || i arr[i + 1]) { int temp = arr[i+1]; arr[i + 1] = arr[i]; arr[i] = temp; swapped = true; i=0; } else { i++; swapped = false; } } foreach ( int element in arr) { Console.Write("{0} ",element); } } } --------------------- contact.if.urgent@gmail.com

### Software Development Engineer In Test (SDET) at Microsoft was asked...

24 May 2012
 In a sequence of alphabets (like aaabbddaabbcc) write a program to find the number of the consecutive alphabets in and print the alphabet and number. example :if input is aaabbddaabbcc then output should be 3a, 2b, 2d, 2a, 2b, 2c4 AnswersI misunderstood the question, and wrote the program for printing number of a's or b's etc., present in the sequence when I showed him he asked me to code according to his requirement, the program should produce output without any errors,during this time he was writing something in the laptop. I wrote program correctly. He said ok.void PrintAlphaNum( string str ) { if ( (str == null) || str.Length == 0 ) { return; } char lastChar = str[0]; int count = 0; foreach( char ch in str ) { if ( ch == lastChar ) { count++; } else { Console.Write("{0}{1}, ", count, lastChar ); count = 1; lastChar = ch; } } if ( count > 0 ) { Console.WriteLine("{0}{1}", count, lastChar ); } }#Iinclude #include main() { char str[ ]; printf("Enter the input\n"); scanf("%c",&str); printf("input:%c",str); int len= strlen(str); int alp[26]; if(str!='NULL' && len!=0) { for(int i=0;iShow more responsesSimple Java Code: String str = "aaabbddaabbcc"; for(int i = 0; i < str.length()-1; i++) { int count = 0; for(int j = i; j < str.length(); j++) { if(str.charAt(i) == str.charAt(j)) count++; else { i += count - 1; break; } } System.out.print(Integer.toString(count) + Character.toString(str.charAt(i)) + ", "); }
110 of 1,985 Interview Questions