Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tasks 223-232 #62

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

Merged
javadev merged 7 commits into javadev:main from IvanMenov:tasks_223_to_232
Nov 27, 2021
Merged

tasks 223-232 #62

javadev merged 7 commits into javadev:main from IvanMenov:tasks_223_to_232
Nov 27, 2021

Conversation

Copy link
Contributor

@IvanMenov IvanMenov commented Nov 27, 2021

No description provided.

Copy link


**Output:** \[null, null, null, 1, 1, false\]

**Explanation:** MyQueue myQueue = new MyQueue(); myQueue.push(1); // queue is: \[1\] myQueue.push(2); // queue is: \[1, 2\] (leftmost is front of the queue) myQueue.peek(); // return 1 myQueue.pop(); // return 1, queue is \[2\] myQueue.empty(); // return false
Copy link
Owner

Choose a reason for hiding this comment

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

It may be changed with ident format.

javadev reacted with thumbs up emoji
assertThat(stack.top, equalTo(2));

assertThat(stack.pop(), equalTo(2));

Copy link
Owner

@javadev javadev Nov 27, 2021
edited
Loading

Choose a reason for hiding this comment

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

The empty lines may be removed.

javadev reacted with thumbs up emoji

**Output:** \[null, null, null, 2, 2, false\]

**Explanation:** MyStack myStack = new MyStack(); myStack.push(1); myStack.push(2); myStack.top(); // return 2 myStack.pop(); // return 2 myStack.empty(); // return False
Copy link
Owner

Choose a reason for hiding this comment

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

It may be changed with the ident format.

javadev reacted with thumbs up emoji

public int calculate(String s) {
char[] ca = s.toCharArray();

Copy link
Owner

@javadev javadev Nov 27, 2021
edited
Loading

Choose a reason for hiding this comment

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

The empty line may be removed.

javadev reacted with thumbs up emoji
strB.append("->").append(b);
}

ranges.add(strB.toString());
Copy link
Owner

Choose a reason for hiding this comment

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

The empty line may be removed.

javadev reacted with thumbs up emoji
int popValue = queueOne.remove();
queueOne.addAll(queueTwo);
queueTwo.clear();

Copy link
Owner

Choose a reason for hiding this comment

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

The empty line may be removed.

javadev reacted with thumbs up emoji
}

public int helper(char[] ca) {

Copy link
Owner

Choose a reason for hiding this comment

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

The empty line may be removed.

javadev reacted with thumbs up emoji
@javadev javadev merged commit 34c3862 into javadev:main Nov 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@javadev javadev javadev left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /