Welcome to CS163 at CCUT

About Your Instructor:

I’m glad to be back in Changchun and to see everyone here at CCUT again.

Some quick facts about me:

CS162 and CS163 at CCUT

CS162 and CS163 at PSU

The goal of CS163 at PSU is to teach students data structures in C.
Students should have leaned basic C
syntax and semantics in CS162.

In CS162 at PSU, students learn:

Additionally, students are expected to know how to create basic programs individually with a text editor and compile them using g++.

Classes at PSU are 10 weeks long. Students are assigned 5 programming projects during each of these classes.
So students get a lot of practice programming.

Our main goal at PSU is to produce graduates can program well.

Proficiency Demos at PSU

PSU students in CS162, CS 163, and CS202 take two Proficiency Demos during each class. (Total 6 of these exams.)

These programming exams are to make sure that PSU students can program on their own before moving to the next class.

During a Proficiency Demo, the student is given a problem and is asked to program a solution without any help from the internet, professor, or classmates.

For example, a CS162 Proficiency Demo problem might look like the following:

Write a function that will return the largest int
from a linear linked list of ints.  

Students who do not pass the Proficiency Demos cannot pass the class.

And students who do not pass the class cannot continue to the next class.

These are really pretty easy for students who have practiced programming.

How about another example:

Write a function that returns the average value in a
linear linked list of ints.

The Next 3 Weeks

I hope to run my guest lectures in the style that I teach at PSU. And, more importantly, I hope we will have fun while learning.

Please bring your laptops to class so that we can practice programming together.

My philosophy on learning is this:
The best way the learn something is to just play with it

You may use any C++ IDE. But I suggest using a text editor and g++ for those of you who wish to come to PSU.

CS163 is about data structures. We will be looking at implementing linked lists and trees, understanding how they relate to abstraction, and begin to think about searching and sorting algorithms.

We also start to think about software design and performance.

It is important that you learn how to write an algorithm and analyze its performance

It’s also important to have fun!


FizzBuzz

Let’s do a warm up programming exercise together called FizzBuzz.

In the US, companies sometimes ask the applicant to write this program during an interview. I know someone who was just asked to write FizzBuzz on an interview last week!

It is designed to see if the candidate has any ability to program.

FizzBuzz:
Write a program that prints the numbers from 1 to 100.
But for multiples of 3, print "Fizz" and for
multiples of 5, print "Buzz." For multiples of both 3 and 5
print "FizzBuzz."

What does the pseudocode algorithm look like?

Min-Max Sum

If you’re done with FizzBuzz, try this one.

Mini-Max Sum:
Given five positive integers, find the minimum and maximum values
that can be calculated by summing exactly four of the five integers.
Then print the respective minimum and maximum values as a single
line of two space-separated long integers.
 
Input Format:
A single line of five space-separated integers.
 
Output Format
Print two space-separated long integers denoting the respective
minimum and maximum values that can be calculated by summing
exactly four of the five integers.
 
Sample Input
1 2 3 4 5
 
Sample Output
10 14