C++ help because im terrible at it :(

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Status
Not open for further replies.

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
Diplomatically speaking, it's always better to criticize code by offering a better solution. However, I have yet to meet a diplomatic programmer.
 

DanFungus

Diamond Member
Jul 27, 2001
5,857
0
0
Well to be perfectly honest, your failure is in assuming this is how I would write my own program. In reality, I rarely need anything this simple. Should I have cared enough for this person's program, I would have opened my compiler and made sure the code worked at the very least.

No, I didn't even do that. I just wrote some lines that would work and that was that. If I really felt like it I could have optimized the code just like you're suggesting I can't do, and quite honestly I'm not sure why you think this. I've stated repeatedly this is just some program I couldn't care less about so I just typed something out for him.

If I really want to optimize code I like to make sure it works, otherwise I'll just write something for someone else that helps them out with an assignment. As people grow, you realize if they are really interested in something, they will take the time to learn it. Obviously this person just wanted help. Why bother providing coding techniques and etc? Should the person request such code out of sincere interest, I'll do it.

In either event, I can write optimized code. Quit making assumptions.

Not trying to be an ass, but for this I wouldn't consider it to be an issue of optimization, just more of quality of design. There is a much simpler way to count the frequency characters which I am guessing is what Cogman is alluding to, and is what Common Courtesy posted an outline for. It is O(n) time in the number of characters in the input string, O(1) memory (albeit with a decently sized constant factor depending on how many different characters you want to count), and it's easy to understand/read. "Optimized" code doesn't necessarily mean tricky or complex.

I guess an easier solution would be to just use MapReduce
 
Last edited:

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,591
5
0
Folks, remember that this was supposed to be his homework assignment and he may not have given much thought.

That is why I and others did not post a solutions; just point him in the proper direction.

PLEASE do not do homework assignments for people.
They will have a hard time learning the underlying concepts and thinking for themselves.


Common Courtesy
At Admin
 
Last edited by a moderator:

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Folks, remember that this was supposed to be his homework assignment and he may not have given much thought.

That is why I and others did not post a solutions; just point him in the proper direction.

PLEASE do not do homework assignments for people.
They will have a hard time learning the underlying concepts and thinking for themselves.


Common Courtesy
At Admin

Roger that.
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Not trying to be an ass, but for this I wouldn't consider it to be an issue of optimization, just more of quality of design. There is a much simpler way to count the frequency characters which I am guessing is what Cogman is alluding to, and is what Common Courtesy posted an outline for. It is O(n) time in the number of characters in the input string, O(1) memory (albeit with a decently sized constant factor depending on how many different characters you want to count), and it's easy to understand/read. "Optimized" code doesn't necessarily mean tricky or complex.

I guess an easier solution would be to just use MapReduce

Sigh.
 

iCyborg

Golden Member
Aug 8, 2008
1,327
52
91
Sorry, but the guys are right - using an O(n^2) solution where an equally simple O(n) solution exists (and is described by several people) is just a wrong approach, and nothing to do with (premature) optimization. Especially so for homework type of things where principles and algorithms are being taught on toy examples. And even on a commercial product produced by a team that does code reviews, you would get the same kind of criticism you got from Cogman and others with at least semi-competent developers going over it. Learn from it, don't be defensive...
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
Sorry, but the guys are right - using an O(n^2) solution where an equally simple O(n) solution exists (and is described by several people) is just a wrong approach, and nothing to do with (premature) optimization. Especially so for homework type of things where principles and algorithms are being taught on toy examples. And even on a commercial product produced by a team that does code reviews, you would get the same kind of criticism you got from Cogman and others with at least semi-competent developers going over it. Learn from it, don't be defensive...

I'm not sure that his solution is O(n^2), yes, his solution is a nested for loop, which usually signifies O(n^2), but the inner loop never grows, it always has a maximum of 26. The time taken by this algorithm is pretty much completely dependent on the size of the array being searched.

That being said, in the worst case, his solution is ~26x slower than the more optimal solution. average probably puts it at 13x slower. (depending on English letter distribution). And ~1x the same speed for best case (possibly slower depending on what the compiler optimizes).

Things like this are, IMO, why big O notation is somewhat messed up. The way an algorithm grows, while important for very large sets, isn't everything. It should be taught, IMO, that selection sorts are faster than heap sorts for small data sets.

(BTW, when I first saw his algorithm I thought the same thing, "Oh, it is an n^2 algorithm.")
 

ObscureCaucasian

Diamond Member
Jul 23, 2006
3,934
0
0
I'm not sure that his solution is O(n^2)...

Yea O notation is weird... the complexity would technically be 26N which would be O(n). Obviously in the real world a 26 times performance increase is desirable, O notation only cares about large values of N, in which case the OPs solution would be much much better than O(n^2).
 

iCyborg

Golden Member
Aug 8, 2008
1,327
52
91
yea, you're right. then let's say that his solution is O(n*s) instead of O(n), where s=size of the alphabet
 

ObscureCaucasian

Diamond Member
Jul 23, 2006
3,934
0
0
I do appreciate the fact that a beginner C++ help thread has deteriorated into a discussion of algorithmic complexity....
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
I do appreciate the fact that a beginner C++ help thread has deteriorated into a discussion of algorithmic complexity....

well, if it makes you feel better, we did give him some good advice before devolving to discussions of algorithm complexity.
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
This discussion is making me glad I just put something together. Didn't think it would turn into one.

It is a O(n^2) because of the double for loops. Just because it is programmed to go to 26 it doesn't mean it will or will remain that way. Have you seen how some compilers will state that 0 is not equal to 0.00? Depends on how it is handled.

That being said, this particular program would most likely run equally as fast with even the slowest processor on the market as a solution that used ascii without double for loops. 13x slower on paper doesn't mean 13x slower in practice. It is simply a method used to get you to think about your program and what it is doing, rather than mathematical facts. If it LOOKS 13x slower, then you should be fixing it to run that 13x faster.
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
This discussion is making me glad I just put something together. Didn't think it would turn into one.

It is a O(n^2) because of the double for loops. Just because it is programmed to go to 26 it doesn't mean it will or will remain that way. Have you seen how some compilers will state that 0 is not equal to 0.00? Depends on how it is handled.

Umm, no, it is not O(n^2). for that to happen, the number of iterations through the loop would have to be growing at a rate related to the number of elements in the string being searched. That simply does not and cannot happen.

The comparison you are talking about is that of a integer to a float, it is very well known and has to do with how floating points are implemented in a computer. It isn't the compilers fault, even if you programmed this in assembly you would get the same issue. Doubles should never be compared with the == operator.

Compilers aren't some sort of special magic. If you look into it, what they do is actually pretty easy to predict.

That being said, this particular program would most likely run equally as fast with even the slowest processor on the market as a solution that used ascii without double for loops. 13x slower on paper doesn't mean 13x slower in practice. It is simply a method used to get you to think about your program and what it is doing, rather than mathematical facts. If it LOOKS 13x slower, then you should be fixing it to run that 13x faster.
I think you are in denial. So, here are some test numbers.
"Cogman's Solution took 262607 Ticks"
"Tweek's Solution took 1767566 Ticks"

And here is the code that did the testing.
Code:
   LARGE_INTEGER start, end;
   const int NUMTESTS = 20000;

   // For kicks and giggles to make sure timeing isn't screwed up.
   for (int i = 0; i < NUMTESTS; ++i)
   {
      cogSol();
      tweekSol();
   }

   QueryPerformanceCounter(&start);
   for (int i = 0; i < NUMTESTS; ++i)
   {
      cogSol();
   }
   QueryPerformanceCounter(&end);

   printf("Cogman's Solution took &#37;d Ticks\n", end.QuadPart - start.QuadPart);

   QueryPerformanceCounter(&start);
   for (int i = 0; i < NUMTESTS; ++i)
   {
      tweekSol();
   }
   QueryPerformanceCounter(&end);

   printf("Tweek's Solution took %d Ticks\n", end.QuadPart - start.QuadPart);

   getc(stdin);

Please note that my code counts words, yours doesn't.

*edit* Reran the tests with optimizations turned on (my bad ). And removed my word counting code to make things more comparable. This is what I got.

Cogman's Solution took 1643 Ticks
Tweek's Solution took 76195 Ticks
 
Last edited:

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Umm, no, it is not O(n^2). for that to happen, the number of iterations through the loop would have to be growing at a rate related to the number of elements in the string being searched. That simply does not and cannot happen.

The comparison you are talking about is that of a integer to a float, it is very well known and has to do with how floating points are implemented in a computer. It isn't the compilers fault, even if you programmed this in assembly you would get the same issue. Doubles should never be compared with the == operator.

Compilers aren't some sort of special magic. If you look into it, what they do is actually pretty easy to predict.


I think you are in denial. So, here are some test numbers.
"Cogman's Solution took 262607 Ticks"
"Tweek's Solution took 1767566 Ticks"

And here is the code that did the testing.
Code:
   LARGE_INTEGER start, end;
   const int NUMTESTS = 20000;

   // For kicks and giggles to make sure timeing isn't screwed up.
   for (int i = 0; i < NUMTESTS; ++i)
   {
      cogSol();
      tweekSol();
   }

   QueryPerformanceCounter(&start);
   for (int i = 0; i < NUMTESTS; ++i)
   {
      cogSol();
   }
   QueryPerformanceCounter(&end);

   printf("Cogman's Solution took %d Ticks\n", end.QuadPart - start.QuadPart);

   QueryPerformanceCounter(&start);
   for (int i = 0; i < NUMTESTS; ++i)
   {
      tweekSol();
   }
   QueryPerformanceCounter(&end);

   printf("Tweek's Solution took %d Ticks\n", end.QuadPart - start.QuadPart);

   getc(stdin);

Considering big O is to look at worst case scenario you should remove the fact it is to the 26 and only consider you have a loop within a loop.

Even if your loop was the following structure:

(int i = 0; i < N; i++)
(int j = i ; j < N; j++)

It is still O(n^2) even though you know it is going to be less than O(n^2). This is one of the most simple examples you get when learning this.

Also even according to the ticks its 6.7 times the difference and depending on what those units represent, it is still going to be considered instant most likely. We're not talking about a program that solves world hunger here.

You're clearly too stubborn to take this scenario for what it actually is. At what point did I state my code is the fastest solution, or even efficient??? Not once. In fact I knew it was a bad solution the entire time I was writing it. Some people just like coding to have fun, some are psycho analytical.

OP, if you wan't to survive socially, I'd consider looking somewhere in between the lines here. Cogman, who is clearly superman, and your own take on the matter. Everyone can't be the king like Cogman here, sorry.
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
Considering big O is to look at worst case scenario you should remove the fact it is to the 26 and only consider you have a loop within a loop.
Big O is not worst case, it only displays how an algorithm will perform generally with increasing n.

Even if your loop was the following structure:

(int i = 0; i < N; i++)
(int j = i ; j < N; j++)

It is still O(n^2) even though you know it is going to be less than O(n^2). This is one of the most simple examples you get when learning this.

Again, your code is O(n), which is faster than O(n^2). There is a big difference.

Also even according to the ticks its 6.7 times the difference and depending on what those units represent, it is still going to be considered instant most likely. We're not talking about a program that solves world hunger here.
You're missing the point. You said earlier "That being said, this particular program would most likely run equally as fast with even the slowest processor on the market as a solution that used ascii without double for loops. 13x slower on paper doesn't mean 13x slower in practice. It is simply a method used to get you to think about your program and what it is doing, rather than mathematical facts. If it LOOKS 13x slower, then you should be fixing it to run that 13x faster." This absolutely proves that your code is significantly slower than a more optimal solution. Why the first test wasn't 13 times slower has more to do with the test set that I used. I didn't try and cherry pick something that your code would fail at.

You're clearly too stubborn to take this scenario for what it actually is.
I might say the same thing about you. You can't admit that you wrote crappy code and then start spouting off stuff that simply isn't true.

At what point did I state my code is the fastest solution
At what point did I state that you stated that your code was the fastest solution? You stated that your code would be comparable to the more optimal solution. That is false, that is what I was showing. You stated that it was O(n^2), that is also false.

, or even efficient??? Not once. In fact I knew it was a bad solution the entire time I was writing it. Some people just like coding to have fun, some are psycho analytical.
No, when you make false statements, expect them to get refuted. This isn't being psycho analytical.

OP, if you wan't to survive socially, I'd consider looking somewhere in between the lines here. Cogman, who is clearly superman, and your own take on the matter. Everyone can't be the king like Cogman here, sorry.
LoL. I'm not the only one that would have came up with the optimal solution. In fact, SEVERAL people on this board would have done exactly what I did, I can pretty much guarantee it. The minute someone criticized your code, you took the defensive and started acting as if I had called your mother a whore. This is both counter productive and childish.

If I see something wrong with code, I'll comment on it. That is sort of the point with a programming forum. I totally expect that if/when I post code with problems that people will point those problems out to me. This is how you improve.

If you say something false about programming, I'm going to call you out on it.
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Big O is not worst case, it only displays how an algorithm will perform generally with increasing n.



Again, your code is O(n), which is faster than O(n^2). There is a big difference.


You're missing the point. You said earlier "That being said, this particular program would most likely run equally as fast with even the slowest processor on the market as a solution that used ascii without double for loops. 13x slower on paper doesn't mean 13x slower in practice. It is simply a method used to get you to think about your program and what it is doing, rather than mathematical facts. If it LOOKS 13x slower, then you should be fixing it to run that 13x faster." This absolutely proves that your code is significantly slower than a more optimal solution. Why the first test wasn't 13 times slower has more to do with the test set that I used. I didn't try and cherry pick something that your code would fail at.


I might say the same thing about you. You can't admit that you wrote crappy code and then start spouting off stuff that simply isn't true.


At what point did I state that you stated that your code was the fastest solution? You stated that your code would be comparable to the more optimal solution. That is false, that is what I was showing. You stated that it was O(n^2), that is also false.


No, when you make false statements, expect them to get refuted. This isn't being psycho analytical.


LoL. I'm not the only one that would have came up with the optimal solution. In fact, SEVERAL people on this board would have done exactly what I did, I can pretty much guarantee it. The minute someone criticized your code, you took the defensive and started acting as if I had called your mother a whore. This is both counter productive and childish.

If I see something wrong with code, I'll comment on it. That is sort of the point with a programming forum. I totally expect that if/when I post code with problems that people will point those problems out to me. This is how you improve.

If you say something false about programming, I'm going to call you out on it.

I haven't been, and am still not defensive of the code. I've stated several times it isn't optimized, and KNEW it wasn't while I was programming and specifically stated "bad". You state EVEN NOW I can't admit its bad code, wth? Are you blind? And what am I "admitting"? I never claimed it was good code, I said it would work for his problem, and it still would. Please quote where I stated this was good, optimized code. I already know you can't.

This is what proves to me and anyone else that you're overboard with this whole thing. I'm trying to point out what the situation is and the worst code on the planet would have worked in this scenario, and you still don't get it. Finding the solution to a problem and being able to look at something and assess the situation are 2 different things. This is where your social skills are lacking.

Feel free to PM me for an optimized solution to your problem.
 

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
Considering big O is to look at worst case scenario you should remove the fact it is to the 26 and only consider you have a loop within a loop.

Even if your loop was the following structure:

(int i = 0; i < N; i++)
(int j = i ; j < N; j++)

It is still O(n^2) even though you know it is going to be less than O(n^2). This is one of the most simple examples you get when learning this.

Also even according to the ticks its 6.7 times the difference and depending on what those units represent, it is still going to be considered instant most likely. We're not talking about a program that solves world hunger here.

You're clearly too stubborn to take this scenario for what it actually is. At what point did I state my code is the fastest solution, or even efficient??? Not once. In fact I knew it was a bad solution the entire time I was writing it. Some people just like coding to have fun, some are psycho analytical.

OP, if you wan't to survive socially, I'd consider looking somewhere in between the lines here. Cogman, who is clearly superman, and your own take on the matter. Everyone can't be the king like Cogman here, sorry.

Do you even know what big-O notation means? This problem has two size parameters: alphabet size (call it M), and input (sentence) length (call it N). The big-O analysis tells you how the algorithm scales with M and N; it doesn't have to be the worst case. For example, the worst case of a naive quicksort that doesn't check for 'good' pivots is O(N^2) (where N is the # of items to be sorted). However, the average case is O(N*logN). All big-O says is that some function f(N) <= c*g(N) = O(g(N)) for some constant c, and for N sufficiently large.

The complexity of your algorithm is O(MN). You have to read each character of the sentence individually. For each character read, you at most scan over M (=26) letters of the (english) alphabet.

Since you have indirect addressing & pointer-arithmetic available, this algorithm only needs to be O(N), since you do not have to search the entire alphabet for a match. I mean this isn't a pure turing machine, lol. Rather you can imagine enumerating the alphabet in order (a=0, b=1, ... z=25) and indexing an array. I guess technically this is called hashing, but it's the most trivial kind of hashing, lol.

But really, I think the problem definition implies that M is fixed. Hence both algorithms are O(N), your constant is way worse than it should be, but both algorithms are linear. Your code as written is O(N) because 26 is a constant. No matter how long or short the input sentence is, you will always do 26 comparisons for each character in the input.
 
Last edited:

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Do you even know what big-O notation means? This problem has two size parameters: alphabet size (call it M), and input (sentence) length (call it N).

The complexity of your algorithm is O(MN). You have to read each character of the sentence individually. For each character read, you at most scan over M (=26) letters of the (english) alphabet.

Since you have indirect addressing & pointer-arithmetic available, this algorithm only needs to be O(N), since you do not have to search the entire alphabet for a match. I mean this isn't a pure turing machine, lol. Rather you can imagine enumerating the alphabet in order (a=0, b=1, ... z=25) and indexing an array. I guess technically this is called hashing, but it's the most trivial kind of hashing, lol.

But really, I think the problem definition implies that M is fixed. Hence both algorithms are O(N), your constant is way worse than it should be, but both algorithms are linear. Your code as written is O(N) because 26 is a constant. No matter how long or short the input sentence is, you will always do 26 comparisons for each character in the input.

Yes, I do. And I know it well enough I don't even need to consider it in this situation, but if you want to take it that far, you should consider worst case scenarios. Less loops = better code.

The fact that big O was even thought of for this program is a problem in and of itself.
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
I haven't been, and am still not defensive of the code. I've stated several times it isn't optimized, and KNEW it wasn't while I was programming and specifically stated "bad". You state EVEN NOW I can't admit its bad code, wth? Are you blind? And what am I "admitting"? I never claimed it was good code, I said it would work for his problem, and it still would. Please quote where I stated this was good, optimized code. I already know you can't.

This is what proves to me and anyone else that you're overboard with this whole thing. I'm trying to point out what the situation is and the worst code on the planet would have worked in this scenario, and you still don't get it. Finding the solution to a problem and being able to look at something and assess the situation are 2 different things. This is where your social skills are lacking.

Feel free to PM me for an optimized solution to your problem.

It wasn't until you last post that you specifically said "bad solution" up until then, you were only throwing out insults and fits.

The situation is this. You write bad code. I called you out on bad code. You start the name calling and insults. I continue to offer to show you a better way. You insist that this code isn't bad and that you could optimize it if you want and throw in a few more insults. We derail into a discussion on big O notation. You come back and say that your code is going to be about the same speed and that it is O(n^2), both statements are false. I point that out. You say that I'm now going overboard and have no social skills.

Does that about sum things up properly? So, the guy that doesn't start with name calling and insults is suddenly the one with social problems? Umm, yeah....
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
It wasn't until you last post that you specifically said "bad solution" up until then, you were only throwing out insults and fits.

The situation is this. You write bad code. I called you out on bad code. You start the name calling and insults. I continue to offer to show you a better way. You insist that this code isn't bad and that you could optimize it if you want and throw in a few more insults. We derail into a discussion on big O notation. You come back and say that your code is going to be about the same speed and that it is O(n^2), both statements are false. I point that out. You say that I'm now going overboard and have no social skills.

Does that about sum things up properly? So, the guy that doesn't start with name calling and insults is suddenly the one with social problems? Umm, yeah....

Ok lets break it down, you started off with an insult, and it was in your first reply to my post. Here it is:

"Op, I would suggest not doing it this way. While it looks like it may work... it is VERY inefficient. (at a first glance).

Tweak155 was this a serious attempt at this problem?"

So take your own advice. Additionally you sent me a PM with your optimized code, telling me you aren't reading what I'm saying (or don't understand). You quoted my post that stated it was bad code and stated in that exact same post I hadn't "admitted" it yet.

I can't help you any further seeing the issue for what it really is. Sorry.

EDIT:

Quoted from your quote, just so you might see it:

Cogman - You can't admit that you wrote crappy code and then start spouting off stuff that simply isn't true.

Quote:
Tweak - At what point did I state my code is the fastest solution

Cogman - At what point did I state that you stated that your code was the fastest solution? You stated that your code would be comparable to the more optimal solution. That is false, that is what I was showing. You stated that it was O(n^2), that is also false.

Quote:
Tweak - , or even efficient??? Not once. In fact I knew it was a bad solution the entire time I was writing it.
 
Last edited:

Cogman

Lifer
Sep 19, 2000
10,278
126
106
Ok lets break it down, you started off with an insult, and it was in your first reply to my post. Here it is:

"Op, I would suggest not doing it this way. While it looks like it may work... it is VERY inefficient. (at a first glance).

Tweak155 was this a serious attempt at this problem?"

So take your own advice. Additionally you sent me a PM with your optimized code, telling me you aren't reading what I'm saying (or don't understand). You quoted my post that stated it was bad code and stated in that exact same post I hadn't "admitted" it yet.

I can't help you any further seeing the issue for what it really is. Sorry.

EDIT:

Quoted from your quote, just so you might see it:

My opening line was sincere and I did not intend for you to take it as an insult. I didn't know if you were joking or not, the code was that bad and in a homework thread.
 

ObscureCaucasian

Diamond Member
Jul 23, 2006
3,934
0
0
But really, I think the problem definition implies that M is fixed. Hence both algorithms are O(N), your constant is way worse than it should be, but both algorithms are linear. Your code as written is O(N) because 26 is a constant. No matter how long or short the input sentence is, you will always do 26 comparisons for each character in the input.

This. To quote the reliable wikipedia:

In typical usage, the formal definition of O notation is not used directly; rather, the O notation for a function f(x) is derived by the following simplification rules:
  • If f(x) is a sum of several terms, the one with the largest growth rate is kept, and all others omitted.
  • If f(x) is a product of several factors, any constants (terms in the product that do not depend on x) are omitted.

So to sum it up, you technically have a O(26n), however everyone would actually just consider that O(n).
 

Patterner

Senior member
Dec 20, 2010
227
0
0
Just throwing this out there, but the point of the exercise, coming near the beginning of the term as it does, is likely to see if the students understand and can use nested for loops.

In that context, Tweet's solution is probably the most appropriate since if the OP started using pointer arithmetic, when pointers have likely not been covered yet, would be a little suspect. Of course, he should have discussed the solution rather than just typing it in like that.

Equally of course, he should have used code tags...everyone knows this.
 

you2

Diamond Member
Apr 2, 2002
5,758
980
126
Oh crise. While I'm all for helping someone with a programming issue; this is a homework assignment and one that is in on way specific to C++. Not so much in the way of details for HW
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
Just throwing this out there, but the point of the exercise, coming near the beginning of the term as it does, is likely to see if the students understand and can use nested for loops.

In that context, Tweet's solution is probably the most appropriate since if the OP started using pointer arithmetic, when pointers have likely not been covered yet, would be a little suspect. Of course, he should have discussed the solution rather than just typing it in like that.

Equally of course, he should have used code tags...everyone knows this.

Pretty sure it wasn't in nested for loops, as they are totally unnecessary. I would say this was an assignment looking at array usage.
 
Status
Not open for further replies.
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |