0

Hi,

I have a scenario where in I had to sort an array, find duplicates and increment one or the other by 1.
So, Eg: An array has 22, 23, 21, 21, 24 within it then, an array should be able to find 21 and increment it by 1 i.e. 22. Also, on the other hand, it should now go scanning from the start and find 22 already present and increment that by 1. So, far had managed to sort an array which is just a part of the entire project.
Anyone too good in VBscript, please?

3
Contributors
2
Replies
10
Views
4 Years
Discussion Span
Last Post by Troy III
0

Hi,

I have a scenario where in I had to sort an array, find duplicates and increment one or the other by 1.
So, Eg: An array has 22, 23, 21, 21, 24 within it then, an array should be able to find 21 and increment it by 1 i.e. 22. Also, on the other hand, it should now go scanning from the start and find 22 already present and increment that by 1. So, far had managed to sort an array which is just a part of the entire project.
Anyone too good in VBscript, please?

Will you excuse my french,
if I say that your algorithm/"scenario" is very dumb - regardless of the language you'll victimize with it?

That's a 'clever' never-ending task you've come up with.
The programming world calls it an infinite loop!
And an infinite loop is "bad for ya"...

Edited by Troy III

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.