↓ 1 callersFunctionswap Return a tuple (b, a) when given two integers a and b >>> swap(2,3) (3, 2) >>> swap(3,4) (4, 3) >>> swap(67, 12) (12, 67)
data_structures/binary_tree/lowest_common_ancestor.py:9
↓ 1 callersFunctionswap_odd_even_bits 1. We use bitwise AND operations to separate the even bits (0, 2, 4, 6, etc.) and odd bits (1, 3, 5, 7, etc.) in the input number. 2.
bit_manipulation/swap_all_odd_and_even_bits.py:10
↓ 1 callersFunctiontim_sort >>> tim_sort("Python") ['P', 'h', 'n', 'o', 't', 'y'] >>> tim_sort((1.1, 1, 0, -1, -1.1)) [-1.1, -1, 0, 1, 1.1] >>> tim_sort(list
sorts/tim_sort.py:43
↓ 1 callersFunctiontranspose >>> transpose([[1,2],[3,4]]) # doctest: +ELLIPSIS <map object at ... >>> transpose([[1,2],[3,4]], return_map=False) [[1, 3], [2, 4]]
matrix/matrix_operation.py:95
↓ 1 callersFunctiontree_sort >>> tree_sort([]) () >>> tree_sort((1,)) (1,) >>> tree_sort((1, 2)) (1, 2) >>> tree_sort([5, 2, 7]) (2, 5, 7) >>>
sorts/tree_sort.py:42
↓ 1 callersFunctiontwo_pointer >>> two_pointer([2, 7, 11, 15], 9) [0, 1] >>> two_pointer([2, 7, 11, 15], 17) [0, 3] >>> two_pointer([2, 7, 11, 15], 18) [1,
maths/two_pointer.py:24
↓ 1 callersFunctiontwo_sum >>> two_sum([2, 7, 11, 15], 9) [0, 1] >>> two_sum([15, 2, 11, 7], 13) [1, 2] >>> two_sum([2, 7, 11, 15], 17) [0, 3] >>> t
maths/two_sum.py:18
↓ 1 callersFunctionupdate Update the speed of the cars >>> update([-1, -1, -1, -1, -1, 2, -1, -1, -1, -1, 3], 0.0, 5) [-1, -1, -1, -1, -1, 3, -1, -1, -1, -1, 4]
cellular_automata/nagel_schrekenberg.py:81
↓ 1 callersMethodupdate_recursive update(1, 1, N, a, b, v) for update val v to [a,b]
data_structures/binary_tree/segment_tree.py:59
↓ 1 callersMethodupdate_velocity
Euler algorithm for velocity
>>> body_1 = Body(0.,0.,0.,0.)
>>> body_1.update_velocity(1.,0.,1.)
>>> body_1.vel
physics/n_body_simulation.py:59