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
what are the challenges you have faced while testing web based application using the automation tools ?
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.
What Folder Structure following in Keyword Driven Frame work?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
Can any suggest me what is exposure testing?
In qtp, explain what is keyword driven automation framework?
how to idetfy which test cases are automated?who will deside that plz tell me
What is the recovery scenario in qtp?
i need to add 1000 users in a domain i written the script for that and it is running successfuly but the problem is that my system is not the user of that domain in which i have to add users so for adding users in that domain i have to install qtp on that another system, can anybody suggest me the way to add those users from my system ultimately i want to know how to access remote computer through script
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
What test cases can you automate using QTP?
After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.
who QTP recognizes the object stored in object repository?