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?

Recommended Answers

All 2 Replies

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"...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.