The magic library
Project description
The Magic Library ! - The library that gives you all the functions and class you need !
Why ?
I decided to create this project during a night at 2am after remembering the videos "Why you suck at coding" of Ben Awad, about the algorithms asked during job interviews. He showed how to resolves this algorithm problem in very stupid ways but I was thinking : Can we even do worse ? Of course you can ! It also remembers me some coding exams during college when sometimes you even have to write C or even worse Java code on paper. I also remember a friend when sometimes we discussed about how to do something and when he didn't know exactly how we could it, it just said "... then we called the magic function ..." and here it is ! The library that (will) contain all famous algorithms that you need for job interviews, college exams, or just some common algorithm you need all the time. But to keep the idea of "calling magic function", the functions be named "reverseBinaryTree" or "magicSquare" but just "magicFunction1", "magicFunction2", etc. So that if during a job interview or an exam they ask you how to reverse a binary tree in python then you can write :
from magicLib import magicfunction1263905
reversedTree = magicfunction1263905(theTree)
Todo
- Everything of course
- For now, I'm just writing
magicFunction1,magicFunction2etc. but I think having a code to classify the algorithm would be nice, like "the function starting by '420' are sorting algorithm" - Create the ultimate function
magicfunctionthat does whatever you want. It should be used like this :reversedTree = magicfunction("reverseBinaryTree", tree) index = magicfunction("fibonacciSearch", arr, 60) ...
The function will just call the right function with the given parameters
Functions implemented
- Reverse String
magicFunction1(str) # or MagicClass.magicFunction("reverseString",str)
- Fibonacci Search
magicFunction2(arr, x) # or MagicClass.magicFunction("fibonacciSearch",arr, x)
- FizzBuzz
magicFunction3() # or MagicClass.magicFunction("fizzBuzz")
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
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
File details
Details for the file the-magic-lib-0.1.1.tar.gz.
File metadata
- Download URL: the-magic-lib-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8643d50ee1ed7151e133f656609fe5c50af6fc87a249277d3fe9f8512eee272
|
|
| MD5 |
2340c9db75e0489805d73d01b63db8be
|
|
| BLAKE2b-256 |
36abe3d7c88752b14cd1511d81c3900859ea52cb14b00a37a551055d869fe6a2
|
File details
Details for the file the_magic_lib-0.1.1-py3-none-any.whl.
File metadata
- Download URL: the_magic_lib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b3ca27e4d7884be9084315070d07b9e31762cc8e11f5bf02278266d57adaeea
|
|
| MD5 |
38c90aa4f4b2880203029cd150a6cd17
|
|
| BLAKE2b-256 |
f7bb10b1db433f6efb60fc9061b6cd01b72426dc2dedd4073649499721d1c22d
|