Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count no. of set bits in Kotlin #7304

Closed
kiruba-r11 opened this issue May 25, 2021 · 3 comments · Fixed by #7305
Closed

Count no. of set bits in Kotlin #7304

kiruba-r11 opened this issue May 25, 2021 · 3 comments · Fixed by #7305

Comments

@kiruba-r11
Copy link
Contributor

🚀 Feature

For a given number, we have to count the no. of set bits

Have you read the Contributing Guidelines on Pull Requests?

YES

Motivation

The Kotlin repository is not having enough programs and concepts like other common programming languages like C++, C, Python, or Java. So, I want to contribute to the Kotlin directory as much as possible and make it have enough programs that could help other Kotlin beginners.

Pitch

It uses an algorithm called Kernighan's Algorithm which is famous to solve this problem in O(no. of set bits) time complexity.

@github-actions
Copy link

Hello @kiruba-r11,
Thank you for opening an issue. 🥳
To get assigned to this particular issue please use /assign
Check this guide before contributing.

@kiruba-r11
Copy link
Contributor Author

/assign

@github-actions
Copy link

This issue has been assigned to @kiruba-r11!
It will become unassigned if it isn't closed within 12 days. A maintainer can also add the pinned label to prevent it from being unassigned.

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

Successfully merging a pull request may close this issue.

1 participant