# on 31-Oct-2018 (Wed)

#### Flashcard 3510253784332

Question
In Linux, when email is received for you (from another user on the same machine or from a user from another machine) it is appended to the file: [...] /<username>
/var/spool/mail
^^ note that spool means a cylindrical device on which film/magnetic tape/other flexible materials can be wound

status measured difficulty not learned 37% [default] 0
10. Mail
m like Bruce Wallaby <bruce@kangeroo.co.au> or bruce@kangeroo.co.au (Bruce Wallaby) . In this case, the surrounding characters are purely cosmetic; only bruce@kangeroo.co.au is ever used. <span>When mail is received for you (from another user on the system or from a user from another system) it is appended to the file /var/spool/mail/<username> called the mail file or mailbox file; <username> is your login name. You then run some program that interprets your mail file, allowing you to browse the file as a sequence of mail messages and read a

#### Flashcard 3511437626636

Question
In algorithms, a queue can be more effieciently implemented as two stacks (when enqueue vs dequeue is evenly distributed) compared to a single linked list, by having an [...] stack and a [...] stack (note: each occlusion is a different word)
insert stack AND remove/delete stack

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511488220428

Question
In algorithms, what is the characteristic that makes a binary tree, a Binary Search Tree (BST)?
In a BST, for a given node with a value, all the nodes in the left sub-tree are less than or equal to the value of that node, and all the nodes in the right sub-tree of this node are greater than the value of that node.

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511505259788

Question
In algorithms, for a Binary Search Tree how do you find the node with smallest value?
You find the left most node by starting from the root node as being current node and keep making the left child the new current node, until there is no more left child, that last node is then the node with lowest value.

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511508405516

Question
In algorithms, for a Binary Search Tree how do you find the node with largest value?
You find the right most node by starting from the root node as being current node and keep making the right child the new current node, until there is no more right child, that last node is then the node with largest value.

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511511551244

Question
In algorithms, the time complexity to find the minimum or maximum value in a Binary Search Tree is [...]
O(h), where h is height of tree.

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511522299148

Question
In algorithms, when you are implementing Binary Tree functionality, you create a BinaryTree class, and an underlying [...] class, which is used in (and its inner workings abstracted away in) the BinaryTree class.
Node

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511526231308

Question
In algorithms/python, when implementing Binary Tree functionality, you do so via the below Tree class, as well as the underlying Node class. Defince the Node class.
class Tree:
def __init__(self):
self.root = None
...
...
class Node:
def __init__(self, data):
self.data = data
self.left_child = None
self.right_child = None

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511530163468

Question
In algorithms/python, when implementing Binary Tree functionality, you do so via the BinaryTree class, as well as the underlying Node class. Defince the BinaryTree class (class signature and constructor only) given the underlying Node class below:
class Node:
def __init__(self, data):
self.data = data
self.left_child = None
self.right_child = None


class BinaryTree:
def __init__(self):
self.root = None
[default - edit me]

status measured difficulty not learned 37% [default] 0

#### pdf

cannot see any pdfs

#### Flashcard 3511534882060

Question
In algorithms/python, for Binary Search Trees, given the below class definitions for Node and Tree class, complete the find_min function to return the node which has the minimum value in the BST:
class Node:
def __init__(self, data):
self.data = data
self.right_child = None
self.left_child = None

class Tree:
def __init__(self):
self.root = None

# returns pointer to node with min value
def find_min(self):
####  IMPLEMENT THIS FUNCTION BODY #####

    def find_min(self):
return current