Movatterモバイル変換


[0]ホーム

URL:


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

Commitc543256

Browse files
refactor 225
1 parent298ff76 commitc543256

File tree

1 file changed

+0
-16
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-16
lines changed

‎src/main/java/com/fishercoder/solutions/_225.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22

33
importjava.util.LinkedList;
44
importjava.util.Queue;
5-
/**
6-
* 225. Implement Stack using Queues
7-
*
8-
* Implement the following operations of a stack using queues.
9-
10-
push(x) -- Push element x onto stack.
11-
pop() -- Removes the element on top of the stack.
12-
top() -- Get the top element.
13-
empty() -- Return whether the stack is empty.
14-
15-
Notes:
16-
You must use only standard operations of a queue -- which means only push to back, peek/pop from front, size, and is empty operations are valid.
17-
Depending on your language, queue may not be supported natively. You may simulate a queue by using a list or deque (double-ended queue), as long as you use only standard operations of a queue.
18-
You may assume that all operations are valid (for example, no pop or top operations will be called on an empty stack).
19-
Update (2015-06-11):
20-
The class name of the Java function had been updated to MyStack instead of Stack.*/
215

226
publicclass_225 {
237

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp