Questions d'entretiens - Engineer | Glassdoor.ch

Questions d'entretiens - Engineer

356

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

Le top des questions d'entretien

Trier: PertinencePopulaires Date

Find the top minimal m elements of n elements in O(n) time

5 réponses

Heap.

A basic heap would take O(n lg n) time, which wouldn't work here. One step better would be to limit the heap to m elements, which would make it O(n lg m), which is O(n) for sufficiently small m. This may be simply undoable for m == n in O(n) time.

I take that back; it's not undoable. You can find the m'th smallest element in O(n) time; C++ has this implemented as std::nth_element, even. Once you have the m'th smallest element, sweep the input another time and bucket everything smaller than it, which is a second O(n) pass. But yeah; a heap will always be O(n lg m) here, which becomes O(n lg n) if m==n.

Un ou plusieurs commentaires ont été supprimés.
Veuillez consulter lesRègles de la communauté ou les Conditions d'utilisation pour plus d'informations.

Définir une fonction qui met à plat des listes de liste.

3 réponses

Given an array of integers, implement a class to take a snapshot. In particular 2 methods: - int takeSnaphost() //returns the snapshot id - int getFromSnapshot(int snapshotId, int arrayIndex)

3 réponses

How did you solve the problem of the camera mount shaking while in flight?

3 réponses

The question was to find all taxi numbers from 0 - 10^6. Taxi number is a number which can be written as the sum of two squared number, and can be written as two different representations: Taxi number = a^2 + b^2 = c^2 + d^2

3 réponses

Wo sehen sie sich in 5 Jahren? (Weiterbildung, etc.)

2 réponses

Technical questions.

2 réponses

what kind on an animal would i choose to be?

2 réponses

You have a list of matches, where each match is a pair of ints meaning (ID of Player One, ID of Player Two) where in that match player one is better than player two. Make a ranking of all the players in order.

2 réponses

Mostly about trees, lists and data structures.

1 réponse
110 de 356 Questions d'entretien d'embauche

Consultez les questions posées en entretiens pour des emplois similaires