Questions d'entretiens - Engineer |

Questions d'entretiens - Engineer


Questions d'entretien de Engineer partagées par les candidats

Le top des questions d'entretien

Trier: PertinencePopulaires Date

implement sqrt without using math libray

9 réponses


I think exp and ln still require a Math library. How about using Newton's method to find the root of f(x) = x^2 - a, where x is the solution (the sought square root) and where a is the number for which you want to find the square root?

I would have implemented either Taylor or MacLaurin series, centered at an integer number that is closest to the number that you want to find the square root for, such that the square root of this integer is clean. So if you wanted to find the square root of 8.5, I would centre the series at 9 (sqrt(9) = 3), then compute the series at that point. I'd probably choose between 8 and 10 terms, as that is what is used in any scientific calculator.

A few questions on basic command-line syntax in Unix shells: 1. How would you log output and error messages from a command to a file? 2. How would you run the same command on every file in a directory? 3. How would you find the PID of a named process (say if you wanted to kill it)?

5 réponses

Recently I attended the interview at Google and I was asked "You are given a sorted list of disjoint intervals and an interval, e.g. [(1, 5), (10, 15), (20, 25)] and (12, 27). Your task is to merge them into a sorted list of disjoint intervals: [(1, 5), (10, 27)]."

9 réponses

Given an array of 1001 elements, consists all numbers from 1-1000. Only one number is repeated. Write a function that returns the repeated number.

4 réponses

Write a function that divides one number by another, without using the division operator, and make it better than O(n).

7 réponses

You have 9 marbles which are all the same weight, except for one which is slightly heavier than the others. You also have an old?style balance, which allows you to weigh two piles of marbles to see which one is heavier (or if they are of equal weight). What is the fewest number of weighings that you can make which will tell you which marble is the heavier one ?

4 réponses

Given 100 white marbles and 100 black marbles and two jaws. Put these marbles in the two jars in a way that would maximize the chance of retrieving a white marble from any given jaw.

4 réponses

After asking the details of my current role, he only gave me a simple coding question. Write a function using C++ or Java that is passed an integer and it returns the number of bits set to 1. Is there a way to improve your solution and make it faster and more efficient?

3 réponses

What will happen to the boiling point of a liquid under vacuum? Will it rise or decrease?

3 réponses

Unexpected question: write a script to perform pattern matching with certain keywords for each line in a file.

2 réponses
110 de 5,452 Questions d'entretien d'embauche