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

feat: add solutions to lc problem: No.379 #3014

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: java code style
  • Loading branch information
yanglbme committed Jun 3, 2024
commit 7318c8ec8ed41841d2caa6af3dfb180438a1b99e
6 changes: 3 additions & 3 deletions solution/0300-0399/0379.Design Phone Directory/Solution.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public PhoneDirectory(int maxNumbers) {
available.add(i);
}
}

public int get() {
if (available.isEmpty()) {
return -1;
Expand All @@ -15,11 +15,11 @@ public int get() {
available.remove(x);
return x;
}

public boolean check(int number) {
return available.contains(number);
}

public void release(int number) {
available.add(number);
}
Expand Down
Loading