2014-09-05から1日間の記事一覧

THE MAJOR ELEMENT(CodeEval)

CHALLENGE DESCRIPTION: The major element in a sequence with the length of L is the element which appears in a sequence more than L/2 times. The challenge is to find that element in a sequence. INPUT SAMPLE: Your program should accept as it…