Here the goal was to show how you can work with lambda and other python chips, so that newcomers learn something new.
Why bad practice? If this needs to be done, let's say in the key= or somewhere else like that. Here's an awkward example: arr = [(1,4),(2,3),(1,3)]; sorted(arr, key = lambda e: sum([*range(*e)]))
lol
:)
how did you come up with this?
For this, it would be possible to implement the girlfriend's task .. For example, 2.4.5.7.8
3.43 µs ± 26.5 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
17 µs ± 143 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
I checked, his decision is almost 2 times faster in time.
I think it's hard for 7kyu
hack:)
This comment is hidden because it contains spoiler information about the solution
what? o_O
Loading collection data...
Here the goal was to show how you can work with lambda and other python chips, so that newcomers learn something new.
Why bad practice? If this needs to be done, let's say in the key= or somewhere else like that. Here's an awkward example: arr = [(1,4),(2,3),(1,3)]; sorted(arr, key = lambda e: sum([*range(*e)]))
lol
:)
how did you come up with this?
For this, it would be possible to implement the girlfriend's task .. For example, 2.4.5.7.8
3.43 µs ± 26.5 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
17 µs ± 143 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
I checked, his decision is almost 2 times faster in time.
I think it's hard for 7kyu
hack:)
This comment is hidden because it contains spoiler information about the solution
what? o_O