---
title: "Discussion on \"LeetCode 225 Implement Stack using Queues - Two Solutions (Easy, Java, O(n))\" | Hashnode"
description: "Discussion on \"LeetCode 225 Implement Stack using Queues - Two Solutions (Easy, Java, O(n))\". LeetCode 225. Implement Stack using Queues\nThis post compares two solutions for LeetCode problem 225, which involves implementing a stack using queues. The first solution uses a single queue with O(n) push and O(1) pop/top operations, while the secon..."
url: "https://hashnode.com/posts/225-implement-stack-using-queues-two-solutions-easy-java-on/686f394510feb7c4ae3f7b8d"
---

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

Discussion

# [LeetCode 225 Implement Stack using Queues - Two Solutions (Easy, Java, O(n))](https://huanganni.hashnode.dev/225-implement-stack-using-queues-two-solutions-easy-java-on?utm_source=hashnode&utm_medium=feed)

LeetCode 225. Implement Stack using Queues This post compares two solutions for LeetCode problem 225, which involves implementing a stack using queues. The first solution uses a single queue with O(n) push and O(1) pop/top operations, while the secon...

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

-   [#java](https://hashnode.com/tag/java)
-   [#data-structures-in-java](https://hashnode.com/tag/data-structures-in-java)
-   [#stack](https://hashnode.com/tag/stack)
-   [#queue](https://hashnode.com/tag/queue)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)

## 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.
