Skip to content

revert 22 patch - #368

Closed
SUSHANT12PRABHU wants to merge 173 commits into
revert-22-patch-1from
master
Closed

SUSHANT12PRABHU wants to merge 173 commits into
revert-22-patch-1from
master

Conversation

@SUSHANT12PRABHU

Copy link
Copy Markdown

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