Skip to content

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

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.

Activity

  1. linked a pull request that will close this issuebinarySearch #884on Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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