Frage im Vorstellungsgespräch bei Finoit

Find maximum occurring elements in a sorted and unsorted array using single loop and some constraints