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
hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career
They asked by using qtp recording writing scripting
How to use the object spy in quicktest professional (qtp) 8.0 version?
What are the Test design techniques you uses in ur project?
what testplan contents and what test strategy contents,what is the diff b/w them
What is a data driven test in qtp?
Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?
What are the benefits of qtp?
What is the difference between a Function and Procedure in QTP?
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.
How to modify object property in qtp ?
Does Low-level recording capture mouse movements?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
what is ODC and GDC?
Explain how Selenium is different from UFT?