---
title: "Discussion on \"LeetCode 232 Implement Queue using Stacks - by using two stacks (Easy, Java)\" | Hashnode"
description: "Discussion on \"LeetCode 232 Implement Queue using Stacks - by using two stacks (Easy, Java)\". O(n) time complexity for peek/pop, other operations O(1)"
url: "https://hashnode.com/posts/leetcode-232-implement-queue-using-stacks-by-using-two-stacks-easy-java/686f53dee7495083f41f75bf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 232 Implement Queue using Stacks - by using two stacks (Easy, Java)](https://huanganni.hashnode.dev/leetcode-232-implement-queue-using-stacks-by-using-two-stacks-easy-java?utm_source=hashnode&utm_medium=feed)

O(n) time complexity for peek/pop, other operations O(1)

Jul 10, 2025 · 3 min read · huanganni.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#leetcode-easy](https://hashnode.com/tag/leetcode-easy)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#stacks-queues](https://hashnode.com/tag/stacks-queues)
-   [#stack](https://hashnode.com/tag/stack)
-   [#queue](https://hashnode.com/tag/queue)

## Written by

[Anni Huang](https://hashnode.com/@HuangAnni)

@HuangAnni · Singapore

  
[View profile](https://hashnode.com/@HuangAnni)

LLM Training Operation Specialist @ ByteDance | Ex-Master of IT in Business (AI track) at SMU

I’m Anni Huang, an AI researcher-in-training currently at ByteDance, specializing in LLM training operations with a coding focus. I bridge the gap between engineering execution and model performance, ensuring the quality, reliability, and timely delivery of large-scale training projects.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
