yukashima huksay

Sep 29, 2019 05:53
Earlier I asked you So if there is a a:b and b:c somewhere in the dict you will include all of a b c in the other list and sort them? and you said yes, in your dict, I see 2:6 and 6:7 which according to your comments will result in 2,6,7 being included in the result... I believe my solution is the correct answer to the question you have asked here, but it seems like that your actual problem is different from the question you have asked, you can ask a new question and correctly describe your actual problem if you want and maybe we will be able to help you then...
Sep 29, 2019 05:53
@John can you make an example pair of input and output for me?
Sep 29, 2019 05:53
@John see the update
Sep 29, 2019 05:53
@John what if my_dict = {1:2, 2:2, 3:4, 4,5}
Sep 29, 2019 05:53
Can you explain to me what exact output you want and why is my output wrong?
Sep 29, 2019 05:53
@John So, does my answer solve your problem now?
Sep 29, 2019 05:53
@John see the edit.
Sep 29, 2019 05:53
@John So if there is a a:b and b:c somewhere in the dict you will include all of a b c in the other list and sort them?
Sep 29, 2019 05:53
@John I don't understand what you want exactly, can you please try to explain a little more what are the properties of these four numbers? why are they special?
 
Dec 23, 2018 08:10
I really have to go now
Dec 23, 2018 08:10
forget it
Dec 23, 2018 08:09
or O(n^1000 * m^10000)
Dec 23, 2018 08:09
so is O(n^3)
Dec 23, 2018 08:08
which fixed settings
Dec 23, 2018 08:08
worst case of the whole problem
Dec 23, 2018 08:08
thank you for trying to help:)
Dec 23, 2018 08:08
I have so much work to do now.
Dec 23, 2018 08:08
let's wait for someone else to come and comment on this
Dec 23, 2018 08:07
or [(x,y) for x in range(n*k) for y in range(m/k)]
Dec 23, 2018 08:06
or what about [(x,y) for x in range(n*10) for y in range(m/10)]
Dec 23, 2018 08:06
what about [(x,y) for x in range(n*2) for y in range(m/2)]
Dec 23, 2018 08:04
is O(n*m) ??
Dec 23, 2018 08:04
[(x,y) for x in range(n) for y in range(m)]
Dec 23, 2018 08:04
can you understand that the time complexity of
Dec 23, 2018 08:03
.....
Dec 23, 2018 08:02
because O(m) = O(n) regardless of the name:))
Dec 23, 2018 08:02
we can only have O(n) + O(m) which is O(n)
Dec 23, 2018 08:01
and tell them there is no such thing as O(n+m)
Dec 23, 2018 08:00
you can go check this out in the meanwhile: stackoverflow.com/questions/25796205/onm-time-complexity
Dec 23, 2018 08:00
ok let's just wait for someone else to come and comment under the post
Dec 23, 2018 07:59
you are definitely lying ...
Dec 23, 2018 07:59
impossible
Dec 23, 2018 07:59
because I have!
Dec 23, 2018 07:59
have you passed any course about complexity?
Dec 23, 2018 07:58
is O(n*m)
Dec 23, 2018 07:58
[(x,y) for x in range(n) for y in range(m)]
Dec 23, 2018 07:58
and m can be the number of classes
Dec 23, 2018 07:57
n can be the number of people
Dec 23, 2018 07:57
and n and m can be different things
Dec 23, 2018 07:57
you can wait for sb else to come and comment under that post and tell you that I'm right.
Dec 23, 2018 07:56
I have known these things for like 4 years now!
Dec 23, 2018 07:56
don't type for me
Dec 23, 2018 07:56
no
Dec 23, 2018 07:55
you mean n*m?
Dec 23, 2018 07:55
[(x,y) for x in range(n) for y in range(m)]
Dec 23, 2018 07:55
what is the time complexity of this:
Dec 23, 2018 07:54
instead of understanding
Dec 23, 2018 07:54
the problem is that you memorize things
Dec 23, 2018 07:53
the call to iterrows() will take O(m) times
Dec 23, 2018 07:52
so whatever we have within the inner loop is run n/m * m times which is n