This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some important aliases | |
SAFE_RM_DIR=${SAFE_RM_DIR:="$HOME/.safe_rm"} | |
REAL_RM=${REAL_RM:="/bin/rm"} | |
# Override rm, because it's always painful to recover | |
# files deleted by rm, if possible at all. Instead, | |
# simply move it to the $SAFE_RM_DIR for later cleaning. | |
rm() | |
{ | |
force=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a set of Strings which represent vertices' data at the k-th level from | |
* the vertex with given data "start". The level is 0 at the given vertex. The level | |
* increments by 1 when traversal goes one level deeper. For example, consider a graph | |
* where A has children {B,C}, B has children {D}, C has children {A}. Then when this | |
* method is called as kthLevelChildren("A", 2), the resulting set would contain | |
* {A, D}, since these vertices are 2 levels starting from "A". | |
* | |
* Note: the purpose of this method is more for testing, in the context of homework 6. | |
* |
NewerOlder