Represents frontier and explored lists as sets