Skip to content

revert 22 patch #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 173 commits into from
Closed

revert 22 patch #368

wants to merge 173 commits into from

Conversation

SUSHANT12PRABHU
Copy link

No description provided.

harshildarji and others added 30 commits January 20, 2018 16:27
noqa to silence flake8 on Python 3 only syntax
insert_tail(Head.next, data) --> Head.next.insert_tail(data)

Fixes: $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./data_structures/LinkedList/singly_LinkedList.py:14:13: F821 undefined name 'insert_tail'
            insert_tail(Head.next, data)
            ^
1     F821 undefined name 'insert_tail'
```

Also formats the code to be compliant with [PEP8](http://pep8.org).
Modernize Python 2 code to get ready for Python 3 AGAIN
Fix unresolved name: insert_tail()
In binary_search_by_recursion, if you search array for a value that does not exist, you will get this error:
RecursionError: maximum recursion depth exceeded in comparison

To fix this, first check to make sure that the value is between left and right points like this:
    if (right < left):
        return None

A similar construct has already been applied to binary_search, but did not exist in the recursive alternative.
Fixed recursion error in binary_search_by_recursion
A small edit. Average case for quicksort changed from O(n^2) to O(n log n). Sited:
https://en.wikipedia.org/wiki/Quicksort
Updated average case for Quicksort
Array implementation
harshildarji and others added 29 commits May 28, 2018 23:35
Create new cipher - Elgamal cipher key generator
Break if the collection is sorted
__raw_input()__ was removed in Python 3 in favor of __input()__.  This change ensure similar functioning in both Python 2 and Python 3.
print() is a function in Python 3
Properly define raw_input() in Python 3
Added a test case check knapsack.py
Made a typo writing name instead of __name__
Added a function which implements knapsack using memory functions. Also I updated the test cases to include test cases for the memory function implementation.
Added test case to knapsack.py
Changed name to __name__. Sorry for the typo!
typo fix: renamed `NeutonMethod.py` to `NewtonMethod.py`
@AnshulMalik AnshulMalik closed this Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.