ghqwerty's Profile
Reputation: 40
Craftsman
- Group:
- Contributor w/DIC++
- Active Posts:
- 876 (0.5 per day)
- Joined:
- 08-August 08
- Profile Views:
- 5,915
- Last Active:
Jul 21 2012 04:10 AM- Currently:
- Offline
Previous Fields
- Country:
- GB
- OS Preference:
- Windows
- Favorite Browser:
- FireFox
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- XBox
- Your Car:
- Who Cares
- Dream Kudos:
- 100
Posts I've Made
-
In Topic: Variable being assigned a value which hasn't been entered
Posted 11 May 2012
nerfpl, thats what i'm trying to do. If the user enters an invalid input have them do it again.
jackofalltrades, Not going to lie, that doesn;t really make sense to me.
Also, i actually forgot to put why i named the thread like i did:
With the code as above but with:
//if ((nLowLim < 0) || (nHighLim < 0)) //{ // //cout << "This function can not take negative values, please try again" << endl; // return VARIABLE_PASSED_NEGATIVE; // we are producing unsigned int //}
commented out, entering a massive number for lower limit sets a value for nLow AND for some reason nHigh. -
In Topic: Interviews for university
Posted 16 Dec 2011
-
In Topic: Interviews for university
Posted 9 Dec 2011
Some others might do them, depending on your course etc.
I know, negligable, that it is about getting a conversation going and giving the interviewer an impression of the person you are, I would still like to do some extra reading just for my own benefit. It also 'could' come up in an interview. For example a friend of mine in an interview he just had got asked about the last news article he read on a new concept and what his thoughts on it were. -
In Topic: How fast are your 10 fingers?
Posted 8 Dec 2011

kinda poor compared to some of you guys here. My problem isn't the quick typing its the habit of going back to correct something which takes up valuable time. I've also only just got onto the laptop again, so i'll try it again in a bit after i've gotten a little more 'muscle memory' so i can type more without looking
-
In Topic: Optimising algorithm issue
Posted 3 Dec 2011
Sorry, either i'm just having a complete mental block in understanding what you mean (which is likely given the amount of school work i have been doing recently, leaving me brain-dead in the evenings), or you've interpretted what i want done wrong (both being my fault
).
I can't add it to a single variable there because i need to know 2 values - the number + the chain length after that point.
Both for your benefit and mine i will outline the pseudo process so that you know what i mean, and it is clear what i want to do.
Quote
for example you are given the following chain as an example in the question
13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
so to speed things up when i iterate through the values starting from 1 i want to add the chain length each value generated in a table. so by the time we get to 13 in the iteration we will have the chain lengths for each number 1-13
just looking at the example chain we can see
starting value => chain length
1 => 1
2 => 2
3 unknown
4 => 3
5 => 6
6 unknown
7 unknown
8 => 4
9 unknown
10 => 7
11 unknown
12 unknown
now we can use these values to reduce the amount of iterations necesary.
when calculating 13
chain length = 0
is it in the table -> no -> perform operation -> 40 chain length = 1
40 -> is it in the table -> no -> perform operation -> 20 chain length = 2
20 -> is it in the table -> no -> perform operation -> 10 chain length = 3
10 -> is it in the table -> yes -> add the corresponding value to the chain length and stop looping.
add 13 => *the resulted chain length from the previous process* to the table and start 14.
Hopefully this makes more sense ?
My Information
- Member Title:
- if($spareTime > 0){ $this->writeCode(); }
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Location:
- study room
- Years Programming:
- 2
- Programming Languages:
-
php, css, html
learning - c#, javascript, jquery(javascript), ajax
Contact Information
- E-mail:
- Click here to e-mail me
- MSN:
-
rugyismysoulx@hotmail.co.uk
- Website URL:
-
http://www.blisswars.com
|
|


Find Topics
Find Posts
View Reputation Given


|
Comments
ghqwerty has no profile comments yet. Why not say hello?