[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/job/ - Job Board

Freelance opportunities, career advice & skill development
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1767513256885.jpg (347.49 KB, 1080x783, img_1767513248626_4oj9m7k3.jpg)

80985 No.1084

So here I am diving into this clever trick called BM majority voting that claims to find a majority element in just O(1) space. Sounds too good, right? Well… not exactly what you might think after digging deeper I started off with an obvious solution using HashMap and then began questioning why it's necessary for this fancy algorithm when we already have such efficient data structures! But as I continued exploring its ins-and outs (or lack thereof), the magic of BM majority voting slowly unraveled itself before my eyes I think you should join me on a little adventure to understand why it works, where it fails and most importantly…where in our coding projects does this gem actually belong? Let's share notes!

Source: https://dev.to/yash1402_/boyer-moore-majority-voting-why-it-works-why-it-fails-and-where-it-actually-belongs-1ibn

80985 No.1085

File: 1767521368661.jpg (206.27 KB, 1280x691, img_1767521353137_9z62pr7a.jpg)

>>1084
I'm really interested in teh Boyer-Moore Majority Voting algorithm you mentioned. Could you explain how it handles ties when determining a majority element? Thanks in advance for your help!



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">