Engineer Interview Questions in Riverside, CA | Glassdoor

Find jobs for Engineer

Engineer Interview Questions in Riverside, CA

Engineer Interview Questions in Riverside, CA

Engineers are responsible for designing and building products. In an interview context, expect to be quizzed on your technical skills, and also evaluated for your ability to work as a part of a team to get things built. The specific questions you are asked will depend on what type of engineering position you are looking for. Try a specific engineering discipline, such as software engineer, electrical engineer, or mechanical engineer.

Top Interview Questions

Sort: RelevancePopular Date

What's the best way to detect a loop in a linked list?

7 Answers

I'll rather make a doubly link list first (easy to navigate both directions) struct node { var element; node* next; node* previous; } *head; //declare head pointer write stub method to set it bool isloop(LList) { if (!isempty(LList) //check if list is not empty { Node *pointer=head; // define pointer setting to head while(pointer.next -> null) //iterate through list from head to tail { if(pointer.next == pointer.previous) //its a loop : next is pointing to previous return true; } return false; // return false if condition is not meat } //end if } //end while } // end method

Keep a hash set of all nodes seen so far O(n) time complexity, O(n) space complexity Keeping a set of all the nodes have seen so far and testing to see if the next node is in that set would be a perfectly correct solution. It would run fast as well. However it would use enough extra space to make a copy of the linked list. Allocating that much memory is prohibitively expensive for large lists. // Inefficient solution function boolean hasLoop(Node startNode){ HashSet nodesSeen = new HashSet(); Node currentNode = startNode; do { if (nodesSeen.contains(currentNode)) return true; nodesSeen.add(currentNode); } while (currentNode = currentNode.next()); return false; }

Use a doubly linked list O(n) time complexity Doubly linked lists make it easy to tell if there is a loop. If you encounter any node that doesn't link to the last node you visited, you know that there are two nodes linking to that node. Because the back links could be initially messed up in some other way, this algorithm is only correct if you can trust the back links. Otherwise it is just a malformed doubly linked list finder. The singly linked list can even be converted into a doubly linked list with little additional work. Again this will require that we change the structure of the Node to accomodate a second link. Something that may not be possible in all cases. Usually a singly linked list is used because the amount of space to allocate for each node is at a premium. // Inefficient solution function boolean hasLoop(Node startNode){ Node currentNode = startNode; Node previousNode = null; do { if (previousNode && currentNode.prev() && previousNode != currentNode.prev()) return true; if (!currentNode.prev()) currentNode.setPrev(previousNode); previousNode = currentNode; } while (currentNode = currentNode.next()); return false; }

What is the difference between a reference and a pointer?

3 Answers

Why do you want to work here

1 Answer

Diagram a network explain the various elements.

1 Answer

What do you know about the HEXFET geometry (the layout of the devices), and why would this particular geometry be an advantage for the applications in which HEXFETs are normally used?

1 Answer

What was your solid oral dose experience?

1 Answer

What is your management style?

1 Answer

Why was I 32 years old and still not married.

1 Answer

What would you do in this scenario? How would you troubleshoot this? Also threw in one that gauged how you follow company policy, departmental fiscal responsibility and how to turn down/say no to your fellow employee. Lastly the typical, yet seemingly difficult to answer "Tell me about yourself?" question.

1 Answer

What do you see yourself doing in 5 years from now?

1 Answer
110 of 255 Interview Questions