Bifalgorithm post · Brisk · Chapter 1

How do sets differ from arrays and linked lists in order and duplication?

How do sets differ from arrays and linked lists in order and duplication? (Brisk · Chapter 1) — "If you’ve done some computer programming, you might see a rese…

Ideas in this flowchart

  • Les ensembles ressemblent aux collections utilisées en programmation, mais ils présentent des différences importantes.
  • Les ensembles, les tableaux et les listes chaînées regroupent des éléments.
  • Les différences essentielles concernent l'ordre et les doublons.
  • Les éléments d'un ensemble n'ont pas d'ordre.
  • {Dad, Mom} est le même ensemble que {Mom, Dad}.
  • Les tableaux et les listes ont généralement un premier, un deuxième et un dernier élément, avec un indice pour chacun.
  • Un ensemble ne contient pas de doublons.
  • L'ensemble M est défini par la propriété de masculinité : chaque élément de Ω est masculin ou ne l'est pas.
  • L'écriture M = {Dad, Dad, T.J.} est dépourvue de sens comme représentation d'un ensemble.
  • Un tableau ou une liste chaînée peut contenir plusieurs copies du même élément à des positions différentes.
Feed/

How do sets differ from arrays and linked lists in order and duplication?

Channel

Brisk

1 page

"If you’ve done some computer programming, you might see a resemblance between sets and the collections of items often used in a program: arrays, perhaps, or linked lists. To be sure, there are some similarities. But there are also some very important differences, which must not be overlooked: No order. As previously mentioned, there is no order to the members of a set. “{Dad, Mom}” is the same set as “{Mom, Dad}”. In a computer program, of course, most arrays or lists have first, second, and last elements, and an index number assigned to each. No duplicates. Suppose M is the set of all males. What would it possibly mean to say M = {Dad, Dad, T.J. }? Would that mean that “Dad is twice the man that T.J. is”? This is obviously nonsensical. The set M is based on a property: maleness. Each element of Ω is either male, or it isn’t. It can’t be “male six times.” Again, in an array or linked list, you could certainly have more than one copy of the same item in different positions."

Flowchart preview
Series cover
👍
0
0 comments0 shares

Sign in to view and post comments.