Deque:Both Ends Without Two Structures
A double-ended queue lets you push and pop at both ends in O(1). How ArrayDeque delivers that in the JDK, and when a deque is a stack, a queue, or a sliding window.
Read MoreBrowse the full archive. Use topics in the sidebar to explore by tag.
A double-ended queue lets you push and pop at both ends in O(1). How ArrayDeque delivers that in the JDK, and when a deque is a stack, a queue, or a sliding window.
Read MoreFIFO as an ADT: enqueue, dequeue, and why a naive array queue slides or wastes space — and how a circular buffer (ring) fixes both.
Read MoreHands-on dmesg recipes for everyday work — inspect boot messages, chase hardware faults, filter by level, and watch the kernel live.
Read MoreLIFO as an ADT: push, pop, peek, and why undo, brace matching, and the call stack are the same layout — implemented with ArrayDeque, not java.util.Stack.
Read MoreHow node-and-pointer lists make splice cheap when you already hold the node, why get(i) walks, and how singly, doubly, and circular variants differ.
Read MoreHow ArrayList grows by doubling, why append is amortized O(1) not a guarantee on the next call, and when a fixed array is the honest choice.
Read MoreHands-on top, htop, and btop recipes — read load averages, find CPU and memory hogs, and triage a busy box in real time.
Read MoreHow a contiguous array makes index i O(1), why insert and delete in the middle slide everything, and how a 2D matrix is still the same layout.
Read MoreA beginner-to-advanced path through data structures: glossary, Big-O literacy, a JDK map, and a living index of every post in this series.
Read MoreJava 15 text blocks (JEP 378): triple-quote multiline strings, incidental indentation, and escape sequences — JSON, SQL, and HTML without + concatenation.
Read More