יש ביניין בגובהה 100 קומות ושני ביצים צריך למצוא את הקומה שממנה הביצים ישברו בכמות זריקות מינימליות
תשובות
הוסף תשובה
|
לצפיה בתשובות
אוגוסט 2016
כמות הזריקות היא 14
עולים לקומה 14 אם הביצה הראשונה נשברה מתחילים לעלות קומה קומה עם הביצה הנוספת עד שמוצאים את הקומה ממנה תשבר הביצה יהיו מקסימום 14 זריקות. אם הביצה לא נשברה עולים לקומה 27 ושוב מבצעים את התהליך. כל פעם שהביצה הראשונה לא נשברת עולים 14-x קומות כאשר X גדל כל עליה
This sometimes varies depending on a position, but usually it's the standard approach - team leader, then HR, etc.
שאלות מתוך הראיון
1. Implement Fibonacchi function without recursion(iterative approach)
2. Few language trick questions, like:
how will certain code snippet be executing if we run async method without awaiting it.
3. what will be the output:
List lst = new List();
for(int i=0; i<10; ++i)
lst.Add(() => Console.WriteLine (i));
foreach(var f in lst)
f();
4. Asked how I would implement a Web service from scratch, what technologies are to be used, how concurrent integration and unit testing would be approached.
5. How would implementing a linked list with SQL table look like. How would I query it to get next value, given current id.