Skip to content

Commit ebda055

Browse files
refactor 232
1 parent 535b05b commit ebda055

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
import java.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
public class _232 {
216

227
public static class Solution1 {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy