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

Commitebda055

Browse files
refactor 232
1 parent535b05b commitebda055

File tree

1 file changed

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

1 file changed

+0
-15
lines changed

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

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

33
importjava.util.Stack;
44

5-
/**
6-
* 232. Implement Queue using Stacks
7-
*
8-
* Implement the following operations of a queue using stacks.
9-
10-
push(x) -- Push element x to the back of queue.
11-
pop() -- Removes the element from in front of queue.
12-
peek() -- Get the front element.
13-
empty() -- Return whether the queue is empty.
14-
15-
Notes:
16-
You must use only standard operations of a stack -- which means only push to top, peek/pop from top, size, and is empty operations are valid.
17-
Depending on your language, stack may not be supported natively. You may simulate a stack by using a list or deque (double-ended queue), as long as you use only standard operations of a stack.
18-
You may assume that all operations are valid (for example, no pop or peek operations will be called on an empty queue).
19-
*/
205
publicclass_232 {
216

227
publicstaticclassSolution1 {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp