Added a switch block to populateAdjMatrix, removed redundant local variable.