traverse « LinkedList « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » LinkedList » traverse 

1. How to create a linked list of nodes that are contained in the max-Depth of a Binary Tree using Java    stackoverflow.com

I've already created the Binary Tree and Linked list classes, I'm just in need of an algorithm that prints ONLY the nodes of the largest path. The height and size of ...

2. Linked list traversal, compiler's symbol table and duplicate identifier checks    stackoverflow.com

My "textbook" goes: a)

Obj p = curScope.locals, last = null;
while (p != null) {
    if (p.name.equals(name)) error(name + " declared twice");
    last = p; p = ...

3. Traversing a custom linked list    stackoverflow.com

I'm writing a program to simulate memory fragmentation. The input file tells what segments need to be input at what time. A sample file is:

N  
C 200  
P 1 2 ...

4. How to remove an element from LinkedList while traversing    coderanch.com

//Eliminate path that are long while (iterator.hasNext()) { BoardState boardstate = (BoardState) iterator.next(); LinkedList path = (LinkedList) boardstate.path; Puzzle puzzle = (Puzzle) path.getLast(); int levelCount = boardstate.getLevel(puzzle); ListIterator iterator2 = searchQueue.listIterator(); while (iterator2.hasNext()) { BoardState boardstate2 = (BoardState) iterator2.next(); LinkedList path2 = (LinkedList) boardstate2.path; Puzzle puzzle2 = (Puzzle) path2.getLast(); int levelCount2 = boardstate2.getLevel(puzzle2); if (puzzle.equals(puzzle2)) { if (levelCount >= levelCount2) { ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.