Skip to content

Required parameter best practice, avoid nested if block for better performance and readability #883

@AbmSourav

Description

@AbmSourav

binarySearch

  • required parameters and optional parameters are ordered in a mixed manner. A common programming convention is adding required parameters at the left and optional parameters at the right.
  • In recursive function, early return base case is better for performance and readability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions