def jump_search(arr,target):
n = len(arr)<EOL>block_size = int(math.sqrt(n))<EOL>block_prev = <NUM_LIT:0><EOL>block= block_size<EOL>if arr[n - <NUM_LIT:1>] < target:<EOL><INDENT>return -<NUM_LIT:1>  <EOL><DEDENT>while block <= n and arr[block - <NUM_LIT:1>] < target:<EOL><INDENT>block_prev = block<EOL>block += block_size<EOL><DEDENT>while arr[block_prev] < target :<EOL><INDENT>block_prev += <NUM_LIT:1><EOL>if block_prev == min(block, n) :<EOL><INDENT>return -<NUM_LIT:1><EOL><DEDENT><DEDENT>if arr[block_prev] == target :<EOL><INDENT>return block_prev<EOL><DEDENT>else :<EOL><INDENT>return -<NUM_LIT:1><EOL><DEDENT>
Jump Search
        Worst-case Complexity: O(√n) (root(n))
        All items in list must be sorted like binary search

        Find block that contains target value and search it linearly in that block
        It returns a first target value in array

        reference: https://en.wikipedia.org/wiki/Jump_search