The Daily CLAD

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

CLAD2017 - Friday Mind Bender - It all looks the same

Active Participant

What are the contents of Numeric Array Out following execution of the VI?

 

Friday Fun Time #2.png

 

Friday Fun Time #2 Answers.png

 

 

Combined.png

Comments
Member

a

I feel like you may intend to wire the for loop iteration terminal to the index terminal of Replace Array Subset vi, but it doesn't influence the results anyway.

Member

A

Member

A.

Is there a reason why the icon changes from the palette to the block diagram for some of the array functions but not others? In this case, Array subset is the same, the other three are different.

 

BDvsPalette.png

 

 

 

Member

A

Member

A

RAVITEJA S


Member

A

Member

A)

First Iteration:

Replace Subset -> {99, 2, 3, 4, 5, 6, 7}

Delete from Array -> {3, 4, 5, 6, 7}

Insert -> {98, 3, 4 , 5 ,6 ,7}

Second Iteration:

Replace Subset -> {99, 98, 4, 5, 6, 7}

Delete -> {98, 5, 6, 7}

Insert -> {98, 98, 5, 6, 7}

Subset -> {98, 5, 6, 7}

 

The given answers have different lengths, so you can also use that as an alternative way to find the correct answer. In each iteration two elements are deleted and then one added. 7-2+1-2+1=5 (after Insert in second iteration) and from that you take a subset which shortens the array by another element => The answer array  has to be 4 elements long.

Knight of NI

A

 

The Replace Array Subset is a red herring since it is just being deleted immediately afterwards.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

I think it is related to what you wire to the terminals. If you wire an array instead of just one constant, you would get a different icon for the first three vi

Member

A

Member

A

Active Participant

a

0# 1 2 3 4 5 6 7  ;  3 4 5 6 7 ; 98 3 4 5 6 7 ; (3 4 5 6 7)
1# 98 3 4 5 6 7 ;  98 5 6 7 ;  98 98 5 6 7 ; 98 5 6 7

People don’t do what you expect, but what you inspect.
- Louis V. Gerstner, IBM
Member

Friday Mind Bender - It all looks the same.png

First Iteration:

Replace Subset -> {1, 2, 3, 4, 5, 6, 7}

Delete from Array -> {3, 4, 5, 6, 7}

Insert -> {98, 3, 4 , 5 ,6 ,7}

Second Iteration:

Replace Subset -> 98, 3, 4, 5, 6, 7}

Delete -> {98, 5, 6, 7}

Insert -> {98, 98, 5, 6, 7}

Subset -> {98, 5, 6, 7}

 

So, letter A It is the correct answer.

Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
Active Participant

Answer: A.  Nice one all.  Well it bends my mind. 

Combined.png

Member

A