Edited, memorised or added to reading queue

on 30-Oct-2018 (Tue)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 3433773534476

Question
In linux, sed [...] 's/e/E/g' test.txt, will replace all occurences of e with E in file test.txt and print results to stdout (i.e. not changing original test.txt file).
Answer
-e

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
rence in the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type <span>sed -e 's/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within lines. Consider,







Flashcard 3503695990028

Question
In algorithms, stacks and queues are special types of [...] data structures.
Answer
list (more specifically: linked-list)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3503730855180

Question
In algorithms/python, you can use a list to implement a queue (although effeciency is not optimal), and to add an item you do list. [...] , and to delete an item you do list. [...] , one is O(1) while the other is O(n).
^^ NOTE: the two occlusions above are each a different answer!
Answer
list.append(item) to enqueue/add
list.pop(0) to dequeue/delete

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3503737146636

Question
In algorithms, a queue can be implemented as a single linked list of nodes (although not of optimal efficiently due to the slow delete), as long as you 1) [...] and 2) each node points to the item in front of it in the queue.
Answer
keep a pointer to the end of the queue

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3503741078796

Question
In algorithms, a queue can be implemented as a single linked list of nodes (although not of optimal efficiently due to the slow delete), as long as you 1) keep a pointer to the end of the queue and 2) [...]
Answer
each node points to the item in front of it in the queue.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Dans ce sens, le problème constitue moins un obstacle à contourner, qu’un élément déclencheur dans le processus d’apprentissage
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 3511406693644

Question
Dans ce sens, le problème constitue moins un obstacle à contourner, qu’un élément déclencheur dans le processus [...]
Answer
d’apprentissage

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Dans ce sens, le problème constitue moins un obstacle à contourner, qu’un élément déclencheur dans le processus d’apprentissage

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 3511408266508

Question
Dans ce sens, le [...] constitue moins un obstacle à contourner, qu’un élément déclencheur dans le processus d’apprentissage
Answer
problème

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Dans ce sens, le problème constitue moins un obstacle à contourner, qu’un élément déclencheur dans le processus d’apprentissage

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 3511423733004

Question
In linux, sed [...] 's/e/E/g' test.txt, will replace all occurences of e with E in file test.txt (i.e. nothing is sent to stdout but the content of test.txt itself are changed).
Answer
-i

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 3511434480908

Question
In algorithms, for implementing a queue, instead of using a single linked list (which is slow on dequeue), a more effecient implementation (when enque and deques happen at the same rate) is using [...] (<-- could be more than one word:))
Answer
two stacks
^^ by adding all incoming items to an Insert stack, and removing from the Remove stack (if remove stack is empty, add all
items from insert stack to it one at a time, which preserves the queue order).

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







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)
Answer
insert stack AND remove/delete stack

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511440772364

Question
In algorithms, a queue can be more efiecntly implemented as two stacks (compared to a single linked list implementation), by [...] (<-- use multi-word description here) an Insert stack, and removing from the Remove stack (if remove stack is empty, add all items from insert stack to it one at a time).
Answer
adding all incoming items to (using simple list.append(item) )

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511444704524

Question
In algorithms, you create a queue (more efficiently than a single linked list) from two stacks, by always adding items to a Insert stack, and removeing items from a Remove stack, how?
Answer
Remove from top of remove stack (list.pop()). If remove stack is empty, add all items from insert stack to it one at a time (since items will be added in reverse order, remove order is kept in tact!), then do the pop()

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511454141708

Question
In algorithms/python, the most effecient implementation of a queue (more effiecient than using python list), where both enqueue and dequeue is O(1), is using a [...] (<-- use multi-word description here)
Answer
double linked list

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511458073868

Question
In algorithms, the most effecient implementation of a queue is a double linked list (i.e. O(1) on both enqueue and dequque), implemented by 1) [..use multi-word description here...] 2) having each node point to the person behind and infront of it in the queue.
Answer
having pointers to both the back and front of the queue

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511461219596

Question
In algorithms, the most effecient implementation of a queue is a double linked list (i.e. O(1) on both enqueue and dequque), implemented by 1) having pointers to both the back and front node of the queue 2) [...use multi-word description here...]
Answer
having each node in the queue point to the person behind and infront of it in the queue.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511464365324

Question
In algorithms, the most effecient implementation of a queue is a double linked list, implemented by having a Queue class, with [...] and [...] methods, as well as properties to point to back and front of the queue, and Node class that implements the nodes in the queue (each node having pointers to node in front and behind it in the queue)
Answer
enqueue and dequeue

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511467511052

Question
In python, if you want to generate a random number (between for example 1 and 10), you would use the [...] method from the random module
Answer
randint

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511470656780

Question
In python, if you want to generate a random number (between for example 1 and 10), you would use the randint method from the [...] module
Answer
random

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511473802508

Question
In python, complete the following code to print out a random number between 1 and 10, inclusive:

from random import randint
print [...]
Answer
randint(1,10)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511476948236

Question
In python, write code to sleep for 10 seconds (hint: it is 2 lines of code).
Answer
from time import sleep
sleep(10)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511480093964

Question
In algorithms, a [...] is a hierarchical form of data structure where there is a distinct (i.e. easily recognizable/distinguishable) parent-child relationship between the items
Answer
tree

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511484026124

Question
In algorithms, a [...] tree is one in which each node has a maximum of two children.
Answer
binary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3511488220428

Question
In algorithms, what is the characteristic that makes a binary tree, a Binary Search Tree (BST)?
Answer
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.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs