How to find duplicates in an array and remove them
efficiently?
Answer Posted / crazy boy
**How to find duplicates in an array and remove them efficiently?
=================================================
dim a(4)
a(0)=10
a(1)=20
a(2)=10
a(3)=20
a(4)=50
for i=0 to ubound(a)
for j=i+1 to ubound(a)
if a(i)=a(j) then
a(i) =empty
end if
next
next
for i=0 to ubound(a)
if a(i)<>"" then
msgbox a(i)
end if
next
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is quicktest professional?
Define Canvas view of UFT?
What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);
What is action? How many types of actions are there in qtp?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
How to use parameterization in qtp?
what is supply chain management?
How do you create regression test packs?
Where can I find and view run-time data table?
How would you export a script from one pc to another in qtp?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
what kind of frame work you used in your last project?
Explain the features and benefits of quick test pro(qtp)?
How can i initiate the objects to find uniquely in OR
How to start recording using quicktest professional?