LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Going to NIWeek 2005? Sign up for the LabVIEW Coding Challenge

All problems were very simple, few minutes of coding.
 
Round 1: open a text file and count the number of occurences of two given words.
Round 2: Find the highest an lowest number in a 1D array without using the "array min/max" function.
Round 3: Generate 5(?) integer random numbers in the range 1..50 with no duplicates.
 
0 Kudos
Message 21 of 26
(2,017 Views)

Alten, correct me if I'm wrong, but this was only supposed to be about speed, right? Performance matters less?

I say this because I can think of 30 seconds solution for problems 2 & 3 (Use sort array and then search array for the former, generate the numbers and use search array on the previous results until you get -1 for the latter).


___________________
Try to take over the world!
0 Kudos
Message 22 of 26
(2,004 Views)

Yes, first one with the correct result on the FP wins.

(Performance counted only indirectly. If your program took 30 seconds to write, but 5 minutes to execute, you probably would loose! ;))

Why would you need "search array" for #2?

Can you find a loop-free version for #1 ? 😮

0 Kudos
Message 23 of 26
(1,995 Views)

The search was meant to help you find the index of the element. If you only need the value, then it's not needed.

How about using spreadsheet string to array with the chosen word as a delimiter and then looking at the array size?

Another option for number 3 is initializing an array will all the numbers and then using the random number to decide which element to delete from the array.


___________________
Try to take over the world!
0 Kudos
Message 24 of 26
(1,989 Views)

Hello all,

This isn't in response to the coding challenge, but I just wanted to say it was good to meet and chat with many of you at NI Week this year.  Thanks for coming out!


Travis M
Applications Engineer
National Instruments

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 25 of 26
(1,958 Views)
Meeting everyone was probably the best thing of NIWeek for me. The seminars and vendors/demos were very helpful, but the networking really helped recharge some of my professional batteries, reminded me that it is a community.

The thing about the coding challenge was that it was very public, with 2 large screen LCD monitors on the wall over our (the competitors) heads. It was also a race, with you not knowing how the other person was doing until you say you're ready to run your code, or they do. On top of it, on the second and final day they announced the competition during the keynote speach in the morning (with most of the attendees in the room or watching on the monitors in the hall) and that Jeff Kodosky, "the father of LabVIEW" would be there. The problems, under most any other circumstance, were relatively trivial, the environment was what added the stress! It was a hoot! I even got my Dad an expo pass to watch me in the "Final Four" (not as impressive as the collegiate ones, they start out with more than 8!) As my Dad's name and mine are the same it caused some amusing confusion when he showed up at the "LabVIEW Community" area before I did and his name tag was read by those who had only met me the previous day. I hope that they continue something of this sort in the future, possibly with some way of having more competitors.

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 26 of 26
(1,917 Views)