internship

OA

1. ReverseArray

arr[len-1] -> arr[len-1-i]

delete len+=1

2. count occur

add i++ at the end of while

3. sortArray

descending bubble sorts

arr[i] > arr[j] -> arr[i] < arr[j]

4. check grade

|| -> &&

5. replace value

<= -> <

6. countDigit

firt need to int temp = num

7. printPattern

add brace for loop

8. Manchester Array

判断数组中的某个元素是否与它之前不同,若相同,新数组的对应位置为0,反之为1

  1. 添加result[0]的special case
  2. A[i]==A[i-1] -> A[i] != A[i-1]

9. removeElement

arr[i++] -> a[i+1]

10. printCharPat

ch++ -> print++

11. insertionSort

change > to <

12. selectSort

change max > arr[j] to max < arr[j]

**

results matching ""

    No results matching ""