The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
This see who the smart ones are
Question: Given an unsorted array of integers, find any 3 numbers that will add up to 100. For example, if the array has -77, 55, 22, 0, 2, and 155, one answer would be -77, 22, and 155.
|
#2
|
|||
|
|||
Looks like no smart people here
|
#3
|
||||
|
||||
The smart ones avoided wasting their time on something they have no need of.
|
#4
|
||||
|
||||
Step 1: Randomly pick 3 numbers from the array
Step 2: Do they add to 100? If Yes, DONE. If No, go to step 1. What do I win? |
#5
|
|||
|
|||
I still don't see your answer. You have just given a question and answered yourself
|
#6
|
||||
|
||||
I gave the answer is pseudo-code. You didn't specify it needed to be in particular language. An algorithm is generally acceptable in computer science as anyone with a basic understanding of a language can easily convert it.
|
Благодарность от: | ||
Paul M |
#7
|
||||
|
||||
It involves numbers... I generally avoid anything involving numbers. Words are my thing. I can barely add up using a calculator
|
#8
|
|||
|
|||
It reminds me of college exercises and Facebook Hacker Cup.
PHP Code:
|
#9
|
||||
|
||||
Is it a homework question?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|