Alojamento Web

This list comparison tool allows you to compare two lists (arrays) to be able you analyze the difference between the two lists. The program receives lists of the type string or number and after starting the comparison it is possible to sort the results.

Input data structure

Input data type

Switch view

List A

List B

Handle data as...

Output data separetad...

Sort all asc
Sort all desc

A diff B

Values in A only
 

B diff A

Values in B only
 

A ∩ B

Intersection of values ​​between A and B
 

A ∪ B

Union of values ​​between A and B
 

A △ B

Symmetric difference between A and B
 

How does the Compare Two Lists tool work?

It will function normally according to the rules of the sets, in Mathematics. However, in this tool, you can also choose the list option, so that it is possible to work with repeated values. The following operations are performed:

Set: A minus B

A minus B

Returns the values ​​that are present only in list A.

Set: B minus A

B minus A

Returns the values ​​that are present only in list B.

Set: A intersection B

A intersection B

They are represented by the values ​​that occur simultaneously in the two lists.

Set: A union B

A union B

They are represented by all the values ​​present in both lists.

Set: Symmetric diference between A and B

Symmetric difference

The symmetric difference of two sets is the set of elements that are in one of the sets, but not at its intersection.

Important note

There is no limitation on the maximum number of rows allowed in a list, however, if you put in too large a volume of data, the browser may slow down or even crash for a moment.

List comparison is a recurring task among professional programmers and students. If you want some new feature for this Compare Two Lists tool, let me know in the comments area. Also, tell me if you found some bug, that I can fix it as soon as possible.

You can learn about how this online list tool works or contribute improving the it by programming some new feature or fixing bugs. For that, go to Github on Github >> Compare Two Lists and make a pull request. This will be great!