Register
|
Login
Published News
Upcoming News
Submit a New Story
Groups
News
World
Politics
Business
Technology
Cool Sites
How To
Research
Programming
Games
Entertainment
Films
TV
Hot
Education
Results
Jobs
Sports
Life Style
Health
Travel
Food
Automobiles
States
Kerala
Interview Questions
Puzzles
Programming Questions
Everything Else
Fun
Photography
CS Resources
RSS
1
Vote
Problem: N/2 Unique and N/2 Duplicates
Posted by
indian1 (#2)
583 days ago (Editorial)
An array of size n, has n/2 unique elements and n/2 occurences of an element. Find the non-unique element in linear time?
Who Voted for this Story
indian1
Comments
Written by
indian1 (#2)
583 days ago
The point is for N/2 Duplicates the only possibilities when we have no consecutive dupicates exist are
1X2X3X
X1X2X3
So all we need to check is out of 3 consecutive elements whether we have a duplicate
-
0
+
Log in to comment
or register
here
.
What is IndiaDiscuss?
Indian Social News and Links Network
Top Users
Tag cloud
Live