Skip to content

Commit dc9c747

Browse files
committed
Initialize python files
1 parent 244c897 commit dc9c747

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
debug.log
1+
debug.log
2+
.vscode

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The objective of this repository is to gain insight into these fundamental conce
1212

1313
**JavaScript**: Requires Node.js v12 or higher. Run shell command `node javascript` in root directory for console outputs (cf. `javascript/index.js` for output script code).
1414

15+
**Python**: Requires Python 3.8 or higher. Run shell command `python main.py` in sub-directory `/python` fo console outputs (cf. `python/main.py` for output script code).
16+
1517
## Summary
1618

1719
| Section | Topic | CLRS 3ed Reference | Dependencies |

javascript/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
// import utilities (ADTs)
7-
let { A, ListNode, TreeNode, RBTreeNode, GraphVertex } = require('./utilities');
7+
let { A, ListNode, TreeNode, RBTreeNode } = require('./utilities');
88

99

1010
// ----- SORTING ALGORITMS ----- //
303 Bytes
Binary file not shown.
307 Bytes
Binary file not shown.

python/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'''
2+
This application demonstrates the use of data structures and
3+
algorithms in the console
4+
'''
5+
6+
# import utilities (ADTs)
7+
from utilities import A
8+
9+
# ----- SORTING ALGORITMS ----- #
10+
print('\n|----- SORTING ALGORITHMS ----|')

python/utilities.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'''
2+
This file contains abstract data types (ADTs) used as
3+
auxiliary data structures in the main data structures
4+
and algorithms
5+
'''
6+
7+
# ----- ABSTRACT DATA TYPES (ADTs) ----- #
8+
9+
# A is a list ADT, represented by a Python list
10+
A = []
11+

0 commit comments

Comments
 (0)