Write a program to find duplicate number from array in minimum time complexity.
Answer / Shivanshu
In many programming languages, the built-in data structures like sets or hash maps can be used to efficiently find duplicates in an array. Here is an example using Python:
```
numbers = [1, 2, 3, 4, 4, 5, 6]
duplicates = set()
for num in numbers:
if num in duplicates:
print(num)
else:
duplicates.add(num)
```
| Is This Answer Correct ? | 0 Yes | 0 No |
explain how to make a control visible and invisible during runtime
To sorting array of 10 elements which sorting is best a)selection b)bubble c)tree sort
What is diffrent between Method and and function in c#
3. . Explain the Cache memory? What is the advantage of a processor having more cache memory?
Explain with examples any 2 features of OOPS.
1 Answers Tavant Technologies, Verifone,
Write a program to show polymorphism.
Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe
what is the difference between an OS(operating system) and Framework?
can we extend a class having only one parameterised constructor.Suggest the process to do it.
why we use abstract word in abstract window toolkit in java language.
I've an application where i need to give access to all the features only to admin and only few features to normal users. Say Menu...i dont want all my menu items to be accessible to all the users only the admin people can see few all the features where as normal users can have access to limited menu items...how can i achieve this. Please note that my menu is not a database driven menu.
Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.