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 the XML file architecture ?
Can any one tell me.......How the test engg's start testing in the compy environment.....real time tester PLSSSS help me i need in depth information regarding this...
Explain quicktest professional (qtp) testing process?
What are the common defects found in your project? (in qtp interview)
Explain the differences between table and db checkpoints?
I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian
Explain different types of checkpoints?
What is a data driven test in qtp?
how to explain a claims and insurance project?
What are the different types of checkpoints?
Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks
can anyone tell me from where i can download qtp demo or crack version
The hybrid framework can be implemented for any application. Is it true?
i can done the project with QTP in that time i can say how many members in my team size?
describe some problems that u had with automating testing tool?