Skip to content

feat: add solutions for lc No.3821#4993

Merged
yanglbme merged 1 commit intomainfrom
dev
Jan 25, 2026
Merged

feat: add solutions for lc No.3821#4993
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 25, 2026 08:46
@idoocs idoocs added core team Issues or pull requests from core team cpp Issues or Pull requests relate to .cpp code go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code labels Jan 25, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds solutions for LeetCode problem #3821: "Find Nth Smallest Integer With K One Bits." The problem requires finding the nth smallest positive integer that has exactly k ones in its binary representation.

Changes:

  • Implements solutions using a combinatorics and greedy approach across multiple programming languages
  • Adds comprehensive documentation in both English and Chinese explaining the algorithm
  • Solutions utilize Pascal's triangle (binomial coefficients) to efficiently determine each bit position

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Chinese documentation explaining the problem, solution approach, and examples
README_EN.md English documentation with problem description, solution explanation, and complexity analysis
Solution.py Python implementation using precomputed combinatorial values
Solution.java Java implementation with static initialization of binomial coefficients
Solution.cpp C++ implementation with lambda initialization of combinatorial array
Solution.go Go implementation with init function for precomputation
Solution.ts TypeScript implementation using BigInt for large number handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yanglbme yanglbme merged commit 48b5843 into main Jan 25, 2026
23 checks passed
@yanglbme yanglbme deleted the dev branch January 25, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core team Issues or pull requests from core team cpp Issues or Pull requests relate to .cpp code go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants