Skip to content

2d iterator solution2 is buggy #10

@mingjunz

Description

@mingjunz

List<List> testcase = new ArrayList<>();
testcase.add(new ArrayList() {{
add(1);
add(2);
}});
testcase.add(new ArrayList() {{
add(3);
}});
testcase.add(new ArrayList() {{
add(4);
add(5);
add(6);
}});
TwoDIterator2 t = new TwoDIterator2(testcase);

	t.next();
	t.next();
	t.hasNext();//this one move the colIt to next List's begin, but next move need to remove previous one, you need to bak up that one.
	t.remove();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions