CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
411
Push a Value onto an Array StackAn array-backed stack stores its values in an int array and keeps `top` as the i...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
412
Pop and Peek on an Array StackThe array stack can already push and display itself. The two ways of reading the...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
413
Is the Array Stack Empty or Full?push, pop and peek all lean on two tiny status methods, and both of them are mis...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
414
Display an Array Stack Bottom to TopThe stack works, but printing one shows nothing useful. Build the text yourself ...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
415
Push onto a Linked-Node StackThis stack has no array and no capacity - it is a chain of nodes, and the field ...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
416
Push and Pop a Generic StackMyStack<T> holds any type by storing the values in an Object array. The pop() th...
easy○ Not Started
Data Structures & AlgorithmsStacks
Solve
417
Enqueue Into an Array QueueShiftQueue stores its values in a plain array and always keeps the front at inde...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
418
Dequeue by Shifting LeftShiftQueue keeps the front of the queue at index 0, so removing it means sliding...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
419
Enqueue With WraparoundCircularQueue never shifts. It tracks where the queue starts (front) and how man...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
420
Dequeue From a Circular QueueCircularQueue removes a value by moving front forward instead of shifting the wh...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
421
Enqueue at the Tail of a Linked QueueLinkedQueue adds at the tail and removes at the head, so it tracks both ends. Ev...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
422
Peek at the Front of a Linked QueueLinkedQueue is complete except for peek(), the method that looks at the front of...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
423
Transfer One Stack Into the OtherStackQueue fakes a queue out of two stacks: enqueue pushes onto inbox, while deq...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
424
Serve the Print QueuePrintQueue holds waiting job names in a java.util.Queue so the printer serves th...
easy○ Not Started
Data Structures & AlgorithmsQueues
Solve
425
Add a Node to the FrontAn IntList keeps its nodes in a chain that starts at head. Inserting at the fron...
easy○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
426
Add a Node to the EndaddFirst() is already written for you. Appending is the expensive twin: with no ...
easy○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
427
Remove the First NodeUnlinking the head node is the mirror image of addFirst(): read the value out, t...
easy○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
428
Count the NodesThis IntList stores no counter, so size() has to find out the hard way: start a ...
easy○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
429
Find the Index of the Smallest ValueNumberList owns an int array and its size. A working selectionSort() is already ...
easy○ Not Started
Data Structures & AlgorithmsSorting
Solve
430
Finish the Bubble Sort Inner LoopNumberList owns an int array and its size. bubbleSort() already has both of its ...
easy○ Not Started
Data Structures & AlgorithmsSorting
Solve
431
Drop the Key Into Place (Insertion Sort)Insertion sort never swaps. It saves one value as key, shifts every larger value...
easy○ Not Started
Data Structures & AlgorithmsSorting
Solve
432
Finish the Binary Search Middle StepThis NumberList is built from values already in ascending order. binarySearch(in...
easy○ Not Started
Data Structures & AlgorithmsSorting
Solve
433
Add to the Front of a DequeArrayDequeInt holds up to 5 ints in a circular array. isEmpty, isFull, size, add...
easy○ Not Started
Data Structures & AlgorithmsDeques
Solve
434
Build the Array Stack CoreThe two fields are declared but nothing sets them up, so a new stack is unusable...
medium○ Not Started
Data Structures & AlgorithmsStacks
Solve
435
Finish the Linked-Node Stackpush and the display are written. The three methods that read or remove the fron...
medium○ Not Started
Data Structures & AlgorithmsStacks
Solve
436
Check for Balanced BracketsA stack is the classic way to check bracket nesting: an opener waits on the stac...
medium○ Not Started
Data Structures & AlgorithmsStacks
Solve
437
Track the Minimum With a Second StackMinStack keeps two stacks: `main` holds every value, and `mins` holds only the v...
medium○ Not Started
Data Structures & AlgorithmsStacks
Solve
438
Evaluate a Postfix ExpressionIn postfix notation the operator comes after its two operands, so `3 4 +` means ...
medium○ Not Started
Data Structures & AlgorithmsStacks
Solve
439
Guard an Empty Array QueueShiftQueue can already accept values and print itself, but nothing stops it read...
medium○ Not Started
Data Structures & AlgorithmsQueues
Solve
440
Build the Circular Queue CoreThis CircularQueue has its three fields declared but never set up, and both meth...
medium○ Not Started
Data Structures & AlgorithmsQueues
Solve
441
Circular Queue With front and rearRingQueue tracks front and rear instead of a size counter, which creates a probl...
medium○ Not Started
Data Structures & AlgorithmsQueues
Solve
442
Build Both Ends of a Linked QueueLinkedQueue adds at the tail and removes at the head, so the two missing methods...
medium○ Not Started
Data Structures & AlgorithmsQueues
Solve
443
Queue From Two StacksStackQueue must behave like a queue while owning nothing but two stacks. New val...
medium○ Not Started
Data Structures & AlgorithmsQueues
Solve
444
Find a Node by Index and by ValueA linked list has no random access, so both lookups are the same walk with a dif...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
445
Insert and Remove at a PositionBoth methods share one invariant: to change a link you must be standing on the n...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
446
Remove the First Node Holding a ValueUnlike a counted walk, this one stops on data you cannot predict, so carry two c...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
447
Keep the Tail Pointer HonestA TailedIntList holds head, tail and a size counter so that appending costs O(1)...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
448
Remove the Last NodeThe tail pointer hands you the last node instantly, but it does not save you her...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
449
Walk a Doubly Linked List Both WaysEvery DNode carries a prev as well as a next, so the same chain can be read from...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
450
Remove the Last Node of a Doubly Linked ListIn a singly linked list, removing the last node requires walking the chain to fi...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
451
Reverse the List In PlaceReversing means re-aiming every next pointer at the node behind it instead of bu...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
452
Find the Middle NodeYou could call size() and walk half of it, but one pass is enough: move slow one...
medium○ Not Started
Data Structures & AlgorithmsLinked Lists
Solve
453
Build Selection Sort From Its HelperNumberList gives you two finished helpers: findMinIndex(int start), which return...
medium○ Not Started
Data Structures & AlgorithmsSorting
Solve
454
Write Binary Search From ScratchThis NumberList is built from values that are already in ascending order, so it ...
medium○ Not Started
Data Structures & AlgorithmsSorting
Solve
455
Keep a List Sorted as You InsertSortedIntList stays in ascending order at all times, so there is no sort to run ...
medium○ Not Started
Data Structures & AlgorithmsSorting
Solve
456
Build Both Ends of a DequeA deque has four doors: add and remove at each end. Lock two of them and the sam...
medium○ Not Started
Data Structures & AlgorithmsDeques
Solve