Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to find duplicates in an array and remove them
efficiently?

Answer Posted / vishnu


Dim a(4)

a(0) = 1
a(1) = 4
a(2) = 5
a(3) = 4
a(4) = 5

For i = ubound(a)-1 to 0 step - 1
For j=0 to i
If a(j) = a(j+1) Then
a(j) = empty
ElseIf a(j)>a(j+1) Then
temp = a(j+1)
a(j+1) = a(j)
a(j) = temp
End If
Next
Next

For i=0 to ubound(a)
print a(i)
Next

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Disadvantages of shared object repository?

1107


What are the various types of Actions in UFT?

1050


How many add-ins comes by default with qtp?

1002


how to disable the pop ups through QTP using a script

2253


What is RTM (require ment tracebulity marix) fromate?

2034


How to use reporter.report event in qtp ?

1020


explain abt dyanamic changing object with example?

2310


What are the different types of action?

975


How to create Reusable and Multiple Actions?

2170


Which scripting language used by quicktest professional?

962


Explain the types of object repository?

974


What are the two types of repositories available, explain them?

1010


terminal services client

2230


what is the diffrence bw qtp architectute and qtp framework?

1985


Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

2001