Senior Software Engineer Interview Questions in Vancouver, BC | Glassdoor

# Senior Software Engineer Interview Questions in Vancouver, BC

"Senior software engineers are the most experienced member of a software team and usually carry the most responsibility and authority of that team. Because of this, interviews will be designed to find candidates who have expert knowledge of the field and years of experience as a software engineer. Expect to be asked tough technical questions and to give examples of previous projects that you have worked on."

## Top Interview Questions

Sort: RelevancePopular Date

### Senior Software Engineer at Amazon was asked...

Aug 16, 2012
 Write a function that divides one number by another, without using the division operator, and make it better than O(n).7 AnswersThis can be done in a recursive function, the following code is in Python. # get result of a/b without using a "divide" operator def div(a,b): if a < b: return 0 else: return div(a-b, b)+1 This is how human being do the division naturally, however, the running time of this is O(n/m), where n is the size of a, and m is the size of b, which means, O(n/m) is guaranteed to be less than O(n), when m is larger than 1. -MaximThe answer above is still O(n). We can use binary search and find the answer in the interval [1,a] and use multiplication operator.Totally agree with Vasil. Other option: Long Division Algorithm. O(log n) anyway.Show More Responseswhy not just a * b^(-1) :-)// Write a function that divides one number by another, without using the division operator, // Assume that x%y = 0 // O(log n) (function() { 'use strict'; var divide = function(x, y) { var xLength = (x + '').length; var i = 0; var result = 0; var xAry = ('' + x).split(); var xStart = ''; for (i = 1; i = y) { xStart -= y; result = parseInt(result, 10) + 1; } } } return result; }; console.log(divide(1000, 4)); })();Use logarithms? O(1) log(x/y) = log(x) - log(y) = log(answer) answer = 10 ^ log(answer)Convert the number to divide into the base of the number that you are dividing with and then shift the 'bits' to the right by 1 then convert back to decimal

### Senior Software Engineer at Amazon was asked...

Aug 11, 2011
 find LCA for two nodes of a binary tree. 4 AnswersList 1: tree nodes inorder List 2: tree nodes postorder List 3: all the nodes in between the given 2 nodes List 4: all the nodes after the given 2 nodes the LCA is the common node in List 3 and List 4.I think there's an easier solution: List1: the parents of node1 in order bottom to top (can get them by navigating up tree from node 1). Navigate up tree from node2. First parent of node 2 found in list1 is LCA.There is a better and standard approach. The key is to visualize the ancestor in a BST (Of course we are referring to a BST here). If you start from the top of the tree while comparing both values to each node, the point where the branching differs, is going to be your NCA I wrote sample code a while back too http://forum.codecall.net/topic/64400-finding-nearest-common-ancestor-in-a-bst/Show More ResponsesThe advantage? Well complexity is log (n) and there is no extra memory required i.e. no list creation needed

### Senior Software Engineer at Amazon was asked...

Aug 11, 2011
 how to merge two sorted linklist? 2 AnswersUse MergeSort.You don't need merge sort here. This is a O(n) task, because the lists are already sorted. In fact, this merge routine is part of merge sort. No sorting takes place here, only merging, and it could be done in linear time. Node* merge(Node* list1, Node* list2) { Node* merged = null; Node** tail = &merged; while (list1 && list2) { if (list1->data data) { *tail = list1; list1 = list1->next; } else { *tail = list2; list2 = list2->next; } tail = &((*tail)->next); } *tail = list1 ? list1 : list2; return merged; }

### Senior Software Engineer at Salesforce was asked...

Feb 1, 2013
 . JS - what is eval() 6. JS - what is the diffenrence between == and === 7. Web - how do you keep information in a web application - cookie vs session 8. What is GET and POST - differences 9. How hashmaps work - hashCode and equals operators 10. Piriciples of OO - encapsulation, inheritance 11. What is synchronized? 12. Big O of data searching on different data structures - array , linked list, hashtable 13. Java difference of a hashtable and hashmap 14. Something that you are proud of - code and other - industry related 15. Describe a development process - engaging client - requirements - etc 16. Favorite java classes 17. What does AJAX stands for? 18. what type of response can you get from and AJAX call - string or XMLBe the first to answer this question

### Senior Software Engineer - Lumira at SAP was asked...

Jun 9, 2015
 Having a single LinkedList, and not knowing the head or tail. Delete a given node.1 AnswerThis is a trick question! I.e. you can't. What you can do is replace all the internal variables of the next node into the given node, giving the appearance that the given node was deleted. This will of course not work for the last node

### Senior Software Engineer at CDC Software (Hong Kong) was asked...

Aug 13, 2015
 Outline the major parts if you are asked to build a microwave oven. Be the first to answer this question

### Senior Software Engineer at xMatters was asked...

Mar 2, 2017
 Design the data structures for a video game. There could be players and each player could be a different type such as a Wizard, etc. Each player could have different weapons and actions.Be the first to answer this question

### Senior Software Engineer at FI.SPAN was asked...

Mar 28, 2017
 Discussed a bit of Docker Swarm Mode networking and some similar problems we both had with it.Be the first to answer this question

### Senior Software Engineer at Electronic Arts was asked...

Sep 4, 2011
 Describe the objects you would need to create in order to create a soccer game.Be the first to answer this question

### Senior Software Development Engineer at Amazon was asked...

Jun 17, 2017
 Algorithm question about parsing a matrix to identify some shapes Design a cache Relation with your managerBe the first to answer this question
110 of 38 Interview Questions