Download Horizon :: Staff Members :: Save Vault :: XboxMB YouTube


Old 06-15-2012   #1 (permalink)
Regular Member
 
Join Date: Sep 2011
Posts: 441
Thanks: 164
Default Challenge - Need help

Well, I'm doing a 'secret santa' challenge on another forum, but I'm not quite to sure how to go about it. It can be done in any language but I'm going to use VB because I'm comfortable with it. Anyways, this is what needs to be done:

You must make a secret santa list of users who want to exchange gifts.

* Every user is required to enter there location(String),zipcode(int) and if they are willing to ship internationally(boolean).

* The participants shipping preferences come first.
* participants who send a gift to a country other than their own are more likely to receive a gift from a country other than their own. Participants who indicate that they are willing to ship internationally typically wish to receive internationally, so amongst those who are willing to ship internationally, maximize the number of people who receive a gift from a country other than their own.
*whenever possible, participants should not receive a gift from the same person they send a gift to.
*Every participant must be matched.
The matching process should runs efficiently, meaning the execution time is short.


Rules:

* Any programming language, I highly prefer Java.
* No use of library data structures like LinkedList or Arrays.sort, You must make your own linkedlist if you wish to use that structure, same with sorting algorithms.

I have a pretty good general idea on how to do this, but I don't know how to 'receive' a gift back. I'm guessing I need to use a database. I'm just starting as I type this up, so I don't have any real progress yet, but I'd appreciate any help. Thanks!

Last edited by oh Tanner; 06-15-2012 at 07:23 PM.
oh Tanner is offline
Reply With Quote


Old 06-15-2012   #2 (permalink)
Regular Member
 
Join Date: Sep 2011
Posts: 441
Thanks: 164
Default Re: Challenge - Need help

Okay, I've made some progress. I don't need a database anymore - I found a work around. My next problem is making it so that when shipped internationally, you receive a package from another country... How would I do that? I'm using checkboxes for this.

If 'yes' is selected for international shipping, it cannot be from the starting location (the country you're from).

However, if 'no' is selected for international shipping, it can be from the starting location, so I'm just going to make it = to it.

If anyone has any ideas how to do the first part, the yes part, I would greatly appreciate any help!
oh Tanner is offline
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:16 AM.


 

Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
COPYRIGHT (c) 2010 - 2013 - XboxMB - DESIGN BY:
EDENWEBS.COM