Skip to content

子ノードへのアクセス時のインデックス範囲の確認 #6

Description

@coderabbitai

右の子ノードを取得する際に、i*2 + 2last 以下であることを確認する必要があります。そうでないと、ArrayIndexOutOfBoundsException が発生する可能性があります。\n\n詳しくは以下のプルリクエストとコメントをご参照ください。\n- プルリクエスト: https://github.com/hiroki-horiguchi-dev/learning_algorithm_datastructure/pull/5\n- コメント: https://github.com/hiroki-horiguchi-dev/learning_algorithm_datastructure/pull/5#discussion_r1868801190\n\n報告者: @hiroki-horiguchi-dev

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions