Top "Set" questions

A set is a collection in which no element is repeated, which may be able to enumerate its elements according to an ordering criterion (an "ordered set") or retain no order (an "unordered set").

Reduce array to set in Swift

I am trying to reduce an array of objects to a set in Swift and this is my code: objects.…

arrays swift set reduce
Find non-common elements in lists

I'm trying to write a piece of code that can automatically factor an expression. For example, if I have two …

python algorithm list set discrete-mathematics
Python -Intersection of multiple lists?

I am playing with python and am able to get the intersection of two lists: result = set(a).intersection(b) …

python list set intersection
c++ STL set difference

Does the C++ STL set data structure have a set difference operator?

c++ stl set stdset set-difference
Set difference versus set subtraction

What distinguishes - and .difference() on sets? Obviously the syntax is not the same, one is a binary operator, the …

python set subtraction set-difference
How to map/reduce/filter a Set in JavaScript?

Is there any way to map/reduce/filter/etc a Set in JavaScript or will I have to write my …

javascript set ecmascript-6 reduce
Declare variable set = select

This probably sounds like a really stupid question, but how do I declare a variable for used in a PostgreSQL 9.3 …

postgresql variables set plpgsql declare
JSTL Sets and Lists - checking if item exists in a Set

I have a Java Set in my session and a variable also in the session. I need to be able …

list jstl set
How to customize object equality for JavaScript Set

New ES 6 (Harmony) introduces new Set object. Identity algorithm used by Set is similar to === operator and so not much …

javascript set ecmascript-harmony
Cartesian product of an arbitrary number of sets

Do you know some neat Java libaries that allow you to make cartesian product of two (or more) sets? For …

java set cartesian-product