Software Development Engineer Interview Questions | Glassdoor.ie

Software Development Engineer Interview Questions

111

Software development engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given the root of a binary search tree, link all the nodes at the same level, by using an additional Node* level.

2 Answers

Start from the root, put all the nodes in a queue, keep track of number of nodes at current level and at next level by counting, dequeue a node from the queue, put its left and right children in the queue by updating your counts, using your counts, connect the nodes at the same level. O(N) in both time and space.

Queue size is never larger than half+1 of the node count, just noting. Rough code: Queue q = new Queue(); q.Enqueue(root); int count = 1; int nextCount = 0; T prev = null; while (!q.Empty()) { T cur = q.Dequeue(); if (prev != null) { // doubly-link level siblings prev.rightSibling = cur; cur.leftSibling = prev; } count--; if (count == 0) { // next level count = nextCount; nextCount = 0; prev = null; } else { // same level prev = cur; } if (cur.Left != null) { nextCount++; q.Enqueue(cur.Left); } if (cur.Right != null) { nextCount++; q.Enqueue(cur.Right); } }

difference between "hashing a string" and "encrypting a string". Then: is it possible to find two elements for which the hash is the same?

3 Answers

Find exist in maze or prove its non existence.

3 Answers

How would you test a pen?

1 Answer

You have a project and you want to release it in multiple languages. For every language you have a resource file which contains hotkeys of every Module. For example: one module is File which has Find with hotkey F and Free with hotkey F and another module Edit which has Replace with hotkey R. For every module you want to find the colliding Hotkeys. In our example in module File: Find and Free have colliding hotkey "F". In the resource file a hotkey is coded as: \alpha"F"Find.Files; where \alpha is one character: alpha. You have 100 languages and around 6000 hotkeys in a resource file. Determine all the colliding hotkeys.

1 Answer

How would you write a list library class?

1 Answer

C Language: first: how do you open a socket in C? Then: write a program to reverse a string in place.

1 Answer

two threads access the same data in memory. So?

1 Answer

Design patterns. Any of them with which you're familiar?

1 Answer

Say you have 10K web pages. How do you find all the phone numbers contained in them?

1 Answer
110 of 111 Interview Questions

See Interview Questions for Similar Jobs