diff --git a/problems/flatten-nested-list-iterator.java b/problems/flatten-nested-list-iterator.java index 67c406a..e3cf218 100644 --- a/problems/flatten-nested-list-iterator.java +++ b/problems/flatten-nested-list-iterator.java @@ -2,6 +2,8 @@ import java.util.ArrayDeque; import java.util.Iterator; import java.util.List; +// This is the interface that allows for creating nested lists. +// You should not implement it, or speculate about its implementation interface NestedInteger { // @return true if this NestedInteger holds a single integer, rather than a nested list. public boolean isInteger(); @@ -13,23 +15,6 @@ interface NestedInteger { public List getList(); } -/** - * // This is the interface that allows for creating nested lists. - * // You should not implement it, or speculate about its implementation - * public interface NestedInteger { - * - * // @return true if this NestedInteger holds a single integer, rather than a nested list. - * public boolean isInteger(); - * - * // @return the single integer that this NestedInteger holds, if it holds a single integer - * // Return null if this NestedInteger holds a nested list - * public Integer getInteger(); - * - * // @return the nested list that this NestedInteger holds, if it holds a nested list - * // Return empty list if this NestedInteger holds a single integer - * public List getList(); - * } - */ class NestedIterator implements Iterator { private class DFSEntry {