Skip to content

Instantly share code, notes, and snippets.

View JWKnapp's full-sized avatar

Jehoshuah Knapp JWKnapp

View GitHub Profile

class: center, middle

Intersection


class: center, middle

Prompt

Prompt

Given an existing (doubly) linked list class, implement a stack class and a queue class. Do so via classical inheritance and then do so separately via composition. Then talk about which you would choose in this situation and why.

The linked list class has instance methods for addToHead, addToTail, removeFromHead, and removeFromTail.

The queue class should have instance methods for enqueue and dequeue. The stack class should have instance methods for push and pop.

Solution

Tree Traversal


Interviewer Prompt

Today you will write a series of iterator functions for trees.

  • breadthFirst
  • depthFirstPreOrder

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)

Rubric

Score Meaning
0 Critera not met
1 Criteria met inconsistently
2 Criteria met consistently

Frontend (6/24)