The Daily CLAD

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

Re: CLAD2017 - An Introduction to Sets 1 of 5

SercoSteveB
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
crossrulz
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
Master_Samwise
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.

crossrulz
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
abasak86
Member

Option B.

Krishna_kp
Member

option B.

.

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

crossrulz
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
wayrider
Member

B

crossrulz
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
Sangameshsh
Member

B its 3

NishaV
Member

B

Matt-A.
Member

B  3 differing strings. 

NishaV
Member

it is B-> 3

istan0227
Member

B

yash00k
Member

B

SoundNLight
Member

B

puneet82
Member

B

CA-Pioneer
Member

B. The Set is a hash table structure which only include unrepeated elements. Using Set could save searching time significantly because searching element of Set is O(1) in a N size set but array is O(N) for a N size array.

johnwhitcraft
Member

Sets and Maps became available in LabVIEW 2019.