Skip to content

[FEATURE] Binary Exponentiation #1734

@roeticvampire

Description

@roeticvampire

Detailed description

I'd like to add Binary Exponentiation under the Divide and Conquer directory.
The details for the algorithm can be found here

Context

Currently, the repository does not have a lot many algorithms under Divide and Conquer, and binary exponentiation is a simple yet effective algorithm that displays the Divide and Conquer technique.

Possible implementation

We use a recursive approach to calculate the exponent by checking if the last bit is on for our number and multiplying it with the square of the exponent of the power's half.

Additional information

Assign it to me please.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requeststaleAuthor has not responded to the comments for over 2 weeks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions