Far more smarter way for searching median