Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2d iterator solution2 is buggy #10

Open
mingjunz opened this issue Mar 28, 2019 · 0 comments
Open

2d iterator solution2 is buggy #10

mingjunz opened this issue Mar 28, 2019 · 0 comments

Comments

@mingjunz
Copy link

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant