Git Product home page Git Product logo

data_structures_and_algorithms_in_python's Introduction

data_structures_and_algorithms_in_python's People

Contributors

dependabot[bot] avatar jihoonerd avatar rakeshmeena5499 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data_structures_and_algorithms_in_python's Issues

Range function is not producing same as built in range

Range # built in range

r = Range(-1, -7, -2) | r = range(-1, -7, -2)
out: [-1, -3, -5, -7] | out: list(r) [-1, -3, -5]

r = Range(-1, -7, -1) | r = range(-1, -7, -1)
out: list(r) -> [-1, -2, -3, -4, -5, -6, -7, -8] | out: list(r) -> [-1, -2, -3, -4, -5, -6]

missing solutions in chapter 6

Hey @jihoonerd i noticed that chapter 6 had some missing solutions R 6.8 onwards. Are the solutions of those questions located elsewhere in the repository or do they not exist at all?

(Some of those questions are follow ups on previous questions but some are new as well)

I am wondering why you wrote class Empty(Exception):

In the source code author provided in wiley, I find author did not write this class. Authors used from ..exceptions import Empty but it did not work on my PC(Python 3.6, Win10). Also, there is no fold called exceptions in the source code on wiley.com.

If I did not get you wrong, the source code provided on wiley.com is incompelete and we must write our own class Empty(Exception): to make the code usable? This is the reason you write class Empty(Exception): ?

Thanks a lot for providing notebooks and revised pure python code!

Chap3, R-3.27, the time complexity of `example5`

I think there are something wrong in the solution of Chap3, R-3.27.

Firstly, the time complexity of example5 should be O(n^3).

Then, there are some problems when we collect data from example5 for plot. I think we can do it by changing the code a little bit. Like this:

def example5(A, B):
    n = len(A)
    count = 0
    num_calc = 0
    for i in range(n):
        total = 0
        for j in range(n):
            for k in range(1+j):
                total += A[k]
                num_calc += 1
        if B[i] == total:
            count+=1
    return count, num_calc

def get_time_complexity_2(n=100):
    op_nums = []
    for i in range(1, n):
        A = np.random.randint(0, 100, size=(i, ))
        B = np.random.randint(0, 100, size=(i, ))
        _, num_calc = example5(A, B)
        op_nums.append(num_calc)
    plt.plot(op_nums)
    plt.plot(range(n), [i**2 for i in range(n)])
    plt.plot(range(n), [i**3 for i in range(n)])
    plt.legend(['example5', '$n^2$', '$n^3$'])
    plt.title('example5')
    plt.show()

And the plot should like this:
image

Actionlib package seems to be missing from pip

Doing a pip search yielded no results for the actionlib package. Can the name of the package be updated in the requirements.txt file

Pip install seems to be failing with this output on python 3.8/3.9

ERROR: Could not find a version that satisfies the requirement actionlib==1.13.2 (from versions: none)
ERROR: No matching distribution found for actionlib==1.13.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.