Programming Midterm Review CSCI 2100 B Data Structure

Programming Midterm Review CSCI 2100 B Data Structure

Background • CUHK has a strong tradition in ACM ICPC – 8 th in the world in 2000 – 8 th in the world in 2011 – Many regional and world final appearances • Excellent Tutors – 6 weeks to set the questions – Weeks for the preparation of the system – 1 day to copy the hard disks – Additional hours

Exam Statistics • • • Number of Participants: 78 All participants solved at least 1 problem!!! One participant solved all 7 problems!!! Average number of solved problems: 2. 15 Average time (penalty): 183 Total attempts per participant: 7. 9

Exam Statistics • Number of solved problems: Ø 7 – 1 participant Ø 5 – 1 participant (1 non-CSE major) Ø 4 – 2 participants (1 non-CSE major) Ø 3 – 13 participants (1 non-CSE major) Ø 2 – 48 participants (6 non-CSE major) Ø 1 – 13 participants (2 non-CSE major)

Exam Statistics • Acceptance rate for each Problem: ØA – 77/134 (57. 46%) ØB – 66/231 (28. 57%) ØC – 2/139 (1. 44%) ØD – 4/25 (16. 00%) ØE – 16/48 (33. 33%) ØF – 2/40 (5. 00%) ØG – 1/2 (50. 00%)

Prize • Championship: – CHAN, Pak Hay (1155029810) • 1 st Runner-up: – LAM, Ka Ho (1155031192) • 2 nd Runner-up – YU, Chun Lung (1155029407) • Honorable Mention: – PANG Yui Tik (1155030526) – WAN, Ka Ki (1155030851)

Prize • Best Female Coder: – CHU, Wing Yin (1155030760) • Honorable Mention: – DERMAWAN, Teresa (1009637094)

Prize • Best Non-CSE Coder: – LAM, Ka Ho (1155031192) • Honorable Mention: – PANG, Yui Tik (1155030526) • Most Effective Coder: – PANG, Yui Tik (1155030526)

Miscellaneous • Extra credit problem • Looking for summer interns – Internet/Web development – Mobile development

Problem Review

A – String Revision • http: //acm. zju. edu. cn/onlinejudge/show. Problem. d o? problem. Code=3323

B – Intersection of Two Arrays • http: //www. geeksforgeeks. org/union-andintersection-of-two-sorted-arrays-2/ • Best solution: O(m+n) m – the length of array A n – the length of array B

C – Stone Piles • http: //acm. timus. ru/problem. aspx? num=1005 • Brute force can satisfy the time limit

D – Prime Palindromes • USACO 1. 5. 2 • USACO Training Program curriculum is one of the best paths to learn data structures and algorithms.

E – Train Re-arrangement II • Adapted from homework • Algorithm is the same, only need to change stack functions to queue functions

F – Fruit Merge II • Adapted from homework • Use two queues, one for original fruit piles, the other for newly combined fruit piles • Every time, choose two smallest numbers from the two queues

G – Counting Factor Trees • http: //acm. zju. edu. cn/onlinejudge/show. Probl em. do? problem. Code=3405 • Dynamic Programming
- Slides: 17