{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cse101-w12-Notes-Lecture2

cse101-w12-Notes-Lecture2 - If you feel that you entered a...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 101, Winter 2012 Lecture 2 Notes Class URL: http://vlsicad.ucsd.edu/courses/cse101-w12/
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Participation Exercise, January 12 Directions Group yourselves into 2’s or 3’s Write the {names + 4 th number of your SID} for your group onto ONE piece of paper Write down one or more proposed algorithms for the following problem Let E be a sequence of integers x 1 , x 2 , …, x n . A number z is a majority in E if it occurs more than n/2 times in E. Majority Problem: Given a sequence of n numbers, find the majority in the sequence or determine that none exists. Example: <71, 4, 200, 4, 4> has a majority (= 4) <71, 4, 200, 4 ,4,108> has no majority
Image of page 2