Fragen im Bewerbungsgespräch: Software Engineer | Glassdoor.ch

# Fragen im Vorstellungsgespräch: Software Engineer

188

Fragen aus Vorstellungsgesprächen für Software engineer, von Bewerbern geteilt

## Top Vorstellungsgespräch-Fragen

Sortieren: RelevanzBeliebtheit Datum

### Ein Bewerber für eine Stelle als Software Engineer bei Google wurde gefragt...

6. Juli 2015
 Find the top minimal m elements of n elements in O(n) time5 AntwortenHeap.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.Mehr Antworten anzeigenMaybe quickselect? Einer oder mehrere Kommentare wurden entfernt. Weitere Informationen finden Sie in unserem Verhaltenskodex und in unseren Nutzungsbedingungen.

### Ein Bewerber für eine Stelle als Software Engineer bei Google wurde gefragt...

25. März 2019
 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 Antwortenclass SnapArray { public: SnapArray() : snapshotId(0) {} void push_back(int value) { v.push_back(map()); v.back()[snapshotId] = value; } void pop_back() { v.pop_back(); } int takeSnapshot() { ++snapshotId; return snapshotId - 1; } int getFromSnapshot(int snapshotId, int index) { if (index >= v.size()) return 0; auto it = v[index].upper_bound(snapshotId); if (it != v[index].begin()) { --it; return it->second; } return 0; } int operator[](int index) { if (index >= v.size()) return 0; auto it = v[index].rbegin(); return it->second; } void set(int index, int value) { if (index >= v.size()) return; v[index][snapshotId] = value; } int size() { return v.size(); } private: int snapshotId; vector> v; }; int main() { SnapArray sa; sa.push_back(1); sa.push_back(2); sa.push_back(3); for (int i = 0; i < sa.size(); ++i) cout << sa[i] << " "; cout << endl; cout << "Took snapshot: " << sa.takeSnapshot() << endl; sa.set(1, 5); for (int i = 0; i < sa.size(); ++i) cout << sa[i] << " "; cout << endl; cout << "Values of snapshot: " << endl; for (int i = 0; i < sa.size(); ++i) cout << sa.getFromSnapshot(0, i) << " "; cout << endl; return 0; }I don't know how to protect the C++ code here, sorry... ``` class SnapArray { public: SnapArray() : snapshotId(0) {} void push_back(int value) { v.push_back(map()); v.back()[snapshotId] = value; } void pop_back() { v.pop_back(); } int takeSnapshot() { ++snapshotId; return snapshotId - 1; } int getFromSnapshot(int snapshotId, int index) { if (index >= v.size()) return 0; auto it = v[index].upper_bound(snapshotId); if (it != v[index].begin()) { --it; return it->second; } return 0; } int operator[](int index) { if (index >= v.size()) return 0; auto it = v[index].rbegin(); return it->second; } void set(int index, int value) { if (index >= v.size()) return; v[index][snapshotId] = value; } int size() { return v.size(); } private: int snapshotId; vector> v; }; int main() { SnapArray sa; sa.push_back(1); sa.push_back(2); sa.push_back(3); for (int i = 0; i < sa.size(); ++i) cout << sa[i] << " "; cout << endl; cout << "Took snapshot: " << sa.takeSnapshot() << endl; sa.set(1, 5); for (int i = 0; i < sa.size(); ++i) cout << sa[i] << " "; cout << endl; cout << "Values of snapshot: " << endl; for (int i = 0; i < sa.size(); ++i) cout << sa.getFromSnapshot(0, i) << " "; cout << endl; return 0; } ```test

### Ein Bewerber für eine Stelle als Software Engineer bei Leica Geosystems wurde gefragt...

6. Aug. 2015
 How did you solve the problem of the camera mount shaking while in flight?3 AntwortenIn post processing, by using visual cues.Increased the shutter speed ! And obviously get it to better results using post production but shutter speed is vital.By using accelerometers and gyros in combination with image processing methods. You would track features in the camera images and their correlation between frames. This along with sensor data is then fed into a model estimating the camera movement i.e. kalman filter. Using the estimated camera movement the shaking can be corrected for.

### Ein Bewerber für eine Stelle als Software Engineer bei Google wurde gefragt...

28. Feb. 2016
 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^23 Antwortenrange of a will be 10^3, and range of b is at most also 10^3. Then we have a for loop for a and for loop for b, then we also define a hashMap to count how many forms a number has, at the end, if it has 2 forms, we print it as taxi numberA={0}; for i ->1-1000, for j->i to 1000, A[i*i+j*j]++ for i 1-1000000 if A[i]>1 print idef taxi(num): dict = {} for i in range(1, sqrt(num)): for j in range(i+1, sqrt(num)): if i*j in dict.keys(): dict[i*j] += 1 else: dict[i*j] = 1 for k in dict.keys(): if dict[k] > 1: print k

### Ein Bewerber für eine Stelle als Senior Software Engineer bei Google wurde gefragt...

28. Sept. 2017
 what kind on an animal would i choose to be?2 Antworteni picked a liger, which is a mix between a lion and tiger.donkey if hired

### Ein Bewerber für eine Stelle als Software Engineer bei Google wurde gefragt...

11. Dez. 2015
 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 AntwortenThink of each match as a node in an (acyclic) graph and then just topological sort it. Won't work if a winning b and b winning c doesn't imply that a wins c.What if you just sort by number of wins? And then in case of equal points compare personal matches

### Ein Bewerber für eine Stelle als Software Engineer bei Google wurde gefragt...

6. Dez. 2017
 One non-algorithmic question I got asked was about the an interesting project I worked on.1 AntwortI shortly explained my internship project.

### Ein Bewerber für eine Stelle als Software Engineer bei Avaloq wurde gefragt...

25. Nov. 2015
 Which are the Software design patterns you know? 1 AntwortI didn't said Factory, or Decorator or Facade because I am terrible with terminology. i applied those patterns in the past but I don't know them by the name. they were looking for someone that can code out of their head. Like google does, only that google pays 40% more so if you are this type of guy don't waste your time on Avaloq.

### Ein Bewerber für eine Stelle als Software Engineer bei Avaloq wurde gefragt...

25. Nov. 2015
 All the typical HR questions have been asked. Why you wanna leave your current job? why you think you are perfect? why you wanna join this company? what you know about this company etc. Also where you see yourself in 3 years? what was a tough moment at work? strengths? weaknesses?1 AntwortI did my homework there and answered everything. Some tips. 2K employees, software for banking and financial industry, core products, such as, trading securities, interest calculation, curent and personal accounts, risk management etc. and also additional products such as web banking, CRM, mobile banking etc. the company has many large clients , HSBC, UBS, Bracleys, SwissLife etc. The company grew in terms of partners, employees, users, customers since 2000 till 2005 by 1000% then from 2005 to 2010 by 300% and then till 2015 by 50%.

### Ein Bewerber für eine Stelle als Software Engineer bei Avaloq wurde gefragt...

25. Nov. 2015
 How would you implement bubble sort with a heap?1 AntwortI didn't knew this answer either because if I need something I d rather google for it. Again they are looking for robots that know everything out of head.
110 von 188 Fragen im Vorstellungsgespräch