zoukankan      html  css  js  c++  java
  • All error in my program

    not include the library before use some function
    define funtion in main funtion
    do not declare variable before using it

    FileNotFoundException  =>Solution: move the tex file to the project instead of adding to the src folder

    Use String to record Account Number!!

    *Lint: Search a 2D Matrix:
    '%' only use for integer

    count the column in java -> matrix[0].length not matrix[].length


    typo-> start_end should be start_column


    while loop 中忘记update the state of counter


    typo : matrix -> mid


    typo: return true + return true


    binary search 没有添加while loop 循环


    逻辑错误: start =mid + 1 or end = mid - 1 而不是反之

    Oct 6

    Search in a Big Sorted Array:

    变量使用之前未定义
    没有看清楚方法的名字

    binary search 的mid 更新放在了循环的外面

    if + if + else 结构中, 后面的if else自动配对,不是预期的三选一结构


    没有make sure the __first__index

    Oct 7
    求mid值得时候加上int! 求mid值得时候加上int!! 求mid值得时候加上int!!!

    Search in Rotated Sorted Array:

    要检查数组是否越界,当min_index = 0时, min_index -1 = -1 数组越界!!

    不能交替混合使用 initialize an array

    [How do I declare and initialize an array in Java?] (https://stackoverflow.com/questions/1200621/how-do-i-declare-and-initialize-an-array-in-java)
    int[] result = new int[2]; -> result[0] = -1; result[1] = -1
    int[] result = {1,2,3};
    注意看好题目要求的返回数据类型

    ---Oct 14---

    定义新数组报错? Solution: '''List result = new ArrayList(); ''' why use ArrayList to define a List datatype element ?

    ---Oct 17---

    声明必须在调用之前 -> 调用之前必须先声明

    直接return 不可以

    新变量没有声明类型

    CSE6010 - Assignment 4

  • 相关阅读:
    CentOS 7
    CentOS
    CentOS 7
    CentOS 7
    Linux目录结构说明
    CentOS 7
    CentOS 7
    Linux——工具参考篇
    Linux工具进阶
    Selenium——UI自动化测试(2)——How to Download & Install Selenium WebDriver (待续)
  • 原文地址:https://www.cnblogs.com/kong-xy/p/7623434.html
Copyright © 2011-2022 走看看