Updated sorting and file I/O#1
Updated sorting and file I/O#1rawrrawrpurpledinosaur wants to merge 3 commits intoDenseLance:masterfrom
Conversation
|
I will leave the pull request as it is instead of making it a permanent commit, as the content may be beneficial to some. The optimized bubble sort can be faster than the original version empirically, but we all know that it will never beat the allegations for O(n^2) average time complexity. As for file operations, while it is true that the context manager helps with the closing of files ever since a certain Python version, I included |
I just did a small check on my repo, and found that |
Added optimized bubble sort, thought it might be relevant
Added json file reading, used frequently in NoSQL questions where contents of a json file is uploaded to a MongoDB database.