Module Expr Str Assign NameStore Str ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Call NameLoad NameLoad While CompareLt NameLoad NameLoad body Assign NameStore BinOpDiv BinOpAdd NameLoad NameLoad Num If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body While BoolOpAnd CompareGtE NameLoad Num CompareEq SubscriptLoad NameLoad Index BinOpSub NameLoad Num SubscriptLoad NameLoad Index NameLoad body AugAssignSub NameStore Num Return NameLoad orelse If CompareLt SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Num orelse Assign NameStore NameLoad Return Num decorator_list decorator_list
N/A N/A 
Binary search is a famous question in algorithm.

For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time
complexity.

If the target number does not exist in the array, return -1.
 N/A __author__ Danyang Solution N/A N/A binarySearch N/A N/A self nums target N/A N/A N/A 
        basics

        :param nums: The integer array
        :param target: Target number to find
        :return the first position of target in nums, position start from 0
         N/A l 0 N/A h N/A len nums N/A N/A l h N/A N/A mid N/A N/A l h 2 N/A N/A N/A nums N/A mid target N/A N/A N/A N/A mid 0 N/A N/A nums N/A N/A mid 1 N/A nums N/A mid N/A N/A mid 1 N/A mid N/A N/A N/A N/A nums N/A mid target N/A N/A l N/A mid 1 N/A N/A h mid N/A -1 N/A N/A