TRI Coding Challenge.
Project description
TRI Coding Challenge Parser
==========================
Parser Instructions
----------------------
To run parser, `python3 run_parser.py`.
Enter the path of your file `Enter the absolute path of input file:`
Enter the x-largest `Enter value for X-largest:`
Algorithmic Complexity
----------------------
- The parser reads in the document file line by line.
- O(n) * [file I/O]
- Note: scan_document(file_path) is modular to be replaced with more optimal scanning performane.
- An example of faster scanning solution: read file in chunks(1024) or chunks depending on size of file.
- The parser keeps the parsed data in a max-Heap.
- Returning the x-largest values from the max-Heap (delete-max) is O(log n).
- The space complexity of a heap is O(n).
Unit Test Suite
----------------------
To run unit tests `python3 setup.py test`
Hours Spent
----------------------
- I took 1-2 hours to write the parser, 2-4 hours on trying different unit test tools and structure.
==========================
Parser Instructions
----------------------
To run parser, `python3 run_parser.py`.
Enter the path of your file `Enter the absolute path of input file:`
Enter the x-largest `Enter value for X-largest:`
Algorithmic Complexity
----------------------
- The parser reads in the document file line by line.
- O(n) * [file I/O]
- Note: scan_document(file_path) is modular to be replaced with more optimal scanning performane.
- An example of faster scanning solution: read file in chunks(1024) or chunks depending on size of file.
- The parser keeps the parsed data in a max-Heap.
- Returning the x-largest values from the max-Heap (delete-max) is O(log n).
- The space complexity of a heap is O(n).
Unit Test Suite
----------------------
To run unit tests `python3 setup.py test`
Hours Spent
----------------------
- I took 1-2 hours to write the parser, 2-4 hours on trying different unit test tools and structure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parser_shenghui-0.1.0.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
parser_shenghui-0.1.0-py3.6.egg
(11.7 kB
view details)
File details
Details for the file parser_shenghui-0.1.0.tar.gz.
File metadata
- Download URL: parser_shenghui-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ec84fd6c340ba10a96880037a8edd3b10bf3df49ab3a07c40f8a1e5be62308
|
|
| MD5 |
9ef9eb43e9f96391552caabd0e3da48c
|
|
| BLAKE2b-256 |
34a5cb59ce6c7fc8de850f257fe19a30b4d8678ee0467635a86c2e4ddf7c4274
|
File details
Details for the file parser_shenghui-0.1.0-py3.6.egg.
File metadata
- Download URL: parser_shenghui-0.1.0-py3.6.egg
- Upload date:
- Size: 11.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0af0208f92ca3b1a10433f2669728bbcbde940dfbde5a8027e5acb44dbfa7f1
|
|
| MD5 |
7de8a79060c87f641dc8c2029f87865a
|
|
| BLAKE2b-256 |
36f45c96f0405f5e3b4178db2536b2a42dced0480ad581b8668e0db2fe68d9b3
|