Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
beder
13y ago
0 comments
Save
Share
You can do a second pass over the list to check that your solution is actually a majority element. This maintains the linear time and constant space properties.
0 comments
1 comments · 1 top-level
top
newest
oldest
justincormack
13y ago
Unfortunately single pass is usually the binding constraint eg real time data processing.
j
/
k
navigate · click thread line to collapse