Skip to content

Add unit tests for the "How Many Numbers Are Smaller Than the Current Number" problem.#39

Merged
kobukuro merged 1 commit intomainfrom
test/add-how-many-numbers-are-smaller-than-the-current-number-tests
Jan 24, 2026
Merged

Add unit tests for the "How Many Numbers Are Smaller Than the Current Number" problem.#39
kobukuro merged 1 commit intomainfrom
test/add-how-many-numbers-are-smaller-than-the-current-number-tests

Conversation

@kobukuro
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 24, 2026 03:54
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 PR refactors the "How Many Numbers Are Smaller Than the Current Number" (LeetCode 1365) solution and adds comprehensive unit tests. The main solution file is moved from the root src/ directory to the proper package structure src/main/java/com/leetcode/easy/, and JUnit tests are added following established codebase conventions.

Changes:

  • Moved solution from src/HowManyNumbersAreSmallerThanTheCurrentNumber1365.java to proper package structure
  • Added comprehensive documentation including time and space complexity analysis
  • Removed main method and unused imports from the solution
  • Added unit tests covering three example cases including duplicates and edge cases

Reviewed changes

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

File Description
src/main/java/com/leetcode/easy/HowManyNumbersAreSmallerThanTheCurrentNumber1365.java Refactored solution with proper package structure, added detailed complexity documentation
src/test/java/com/leetcode/easy/HowManyNumbersAreSmallerThanTheCurrentNumber1365Test.java Added unit tests covering typical cases, duplicates, and identical elements
src/HowManyNumbersAreSmallerThanTheCurrentNumber1365.java Removed old file from incorrect location

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

@kobukuro kobukuro merged commit 99e0de4 into main Jan 24, 2026
7 checks passed
@kobukuro kobukuro deleted the test/add-how-many-numbers-are-smaller-than-the-current-number-tests branch January 24, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants