Design an algorithm that, given a list of n elements in an array, finds all the elements that appear more than n/3 times in the list. The algorithm should run in linear time ( n >=0 ). You are expected to use comparisons and achieve linear time. No hashing/excessive space/ and don't use standard linear time deterministic selection algorithm.

AnswerBot
2y

Algorithm to find elements appearing more than n/3 times in an array in linear time

  • Divide the array into three equal parts

  • Iterate through the array and count the occurrences of each element in each pa...read more

Help your peers!
Select
Add answer anonymously...

Cisco Electronic Packaging Designer interview questions & answers

An Electronic Packaging Designer was asked Q. In which layer are bridges used?
An Electronic Packaging Designer was asked Q. Given a set of coins with denominations {50, 25, 10, 5, 1} paise, write a progra...read more
An Electronic Packaging Designer was asked Q. Struct s1 { struct { struct {int x;}s2}s3}y; How do you access x?

Popular interview questions of Electronic Packaging Designer

An Electronic Packaging Designer was asked Q1. In which layer are bridges used?
An Electronic Packaging Designer was asked Q2. Given a set of coins with denominations {50, 25, 10, 5, 1} paise, write a progra...read more
An Electronic Packaging Designer was asked Q3. Struct s1 { struct { struct {int x;}s2}s3}y; How do you access x?
Cisco Electronic Packaging Designer Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits