The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: CLAD2017 - An Introduction to Sets 1 of 5

Active Participant

What is the value of Numeric Value Out following execution of the VI?

 

Set A.png

 

a) 2

b) 3

c) 4

d) 5

Comments
Knight of NI

B


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Member

I agree that it is B. It think it is B because there are three unique strings going into the set, and the collection size only looks for unique strings. This still leaves me wondering how a set is different than an array or other form of data manipulation.

Knight of NI

A set is just a list of non-repeating items.  So adding an item that is already there will not actually add anything to the set.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Member

Option B.

Member

option B.

.

What are the applications of sets other than eliminating multiple entries?

Knight of NI

The application I have thought of for sets are for registrations (keeping track of who requested access to a resource).  The set avoids duplicate registrations.

 

I'm sure there are others, I just haven't found them yet.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Member

B

Knight of NI

For those asking for applications for a set, I recently used one (first legitimate use) for an exclusion list (ie don't do something if the message matches something in the set).  I chose the set over a simple array for the duplication issue and a faster search.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5