Sunteți pe pagina 1din 40

CSG2A3

ALGORITMA dan STRUKTUR DATA

First Meet :
Course Introduction
Course Introduction
Course Name: Struktur Data
Course Code: CCH1D4
Credits : 3+1 SKS
– 14 weeks, each
 3 x 50 minutes class (round up to 4)
 150 minutes lab work (10 weeks)
 3 x 2 hours of structured exercise
 3 x 2 hours of independent activity
Introduction
Anditya Arifianto
NIP: 14890028
HP: 085295464439
Email:
– anditya@telkomuniversity.ac.id
– anditya.arifianto@gmail.com
– http://anditya.staff.telkomuniversity.ac.id
Can be found at:
– AI Lab (E107)
Our Rules
Any kind of Cheating and Plagiarism is not acceptable

Be responsible with your attendance

What about language?

Mind your manner

Activity is a point

4 7/26/2018
Point distributions
Mid and Final Exam  60%
– Mid Exam 25-30%
– Final Exam 30-35%

Assignment, Quiz, Project  25%


– Assignment + Quiz 10-15%
– Project 10-15%

Practicum  15%

5 7/26/2018
[Possible] CLO distribution
CLO1 : Array and Linear Linked List
– Exercise, Lab Assessment 1, Mid Term

CLO2 : Linked List Variation


– Exercise, Lab Assessment 2, Mid Term

CLO3 : Stack and Queue


– Exercise, Lab Assessment 3, Final Term

CLO4 : Non Linear : Tree and Graph


– Exercise, Lab Assessment 4, Final Term

CLO5 : Final Project

6 7/26/2018
Course Outline
Week Subject
1 Review Algorithm
2 Sorting and Table Rank
3 Pointer and ADT
CLO 1
4-5 Linked List
6-7 Linked List Variation CLO 2
Mid Term
8 Stack
CLO 3
9 Queue
10 Recursive
11-12 Tree
CLO 4
13-14 Graph

7 7/26/2018
Course Outline – Lab Work
Week Material/Module Subject
1 Cpp Introduction
2 Cpp Introduction
CLO 1
3 Single List
Assessment 1 : Single List
4 Double List
5 Circular List CLO 2
Assessment 2 : List Variation
MID TERM
6 Stack
7 Queue CLO 3
Assessment 3 : Queue
8
Recursive
9 Tree
Assessment 4 : Tree CLO 4
10
Graph

8 7/26/2018
Final Points

A 80 … 100.0
AB 75 … 79.99
B 70 … 74.99
BC 60 … 69.99
C 50 … 59.99
D 40 … 49.99
E 0 ... 39.99

9 7/26/2018
Points – [Possible] Remedial
CLO 1 and 2
– Mid Term Exam
– Time : Late Mid or Late Final

CLO 3 and 4
– Final Term Exam
– Time : Late Final

CLO 5
– No Remedial

10 7/26/2018
Cheating Punishment
Proven cheating on Lab works or Exercises
– Zero score on the respective task

Proven cheating during Assessment


– Zero score on the respective CLO
– No Remedial

Proven cheating on Final Project


– Zero score on CLO 5

11 7/26/2018
A little time to know you guys
Please answer honestly and independently
– Write down your nickname, student number, class, and gender
– Write down your Algorithms and Programming subject scores
– In scale of 1 to 5 (1 bad, 5 good) score yourself how proficient
are you in the subject?
– Write down your score from Calculus I and II
– How many handshakes if 5 people shakes hands with every
other person?
– Draw a 2D shape
Read:
http://anditya.staff.telkomuniversity.ac.id/academ
ic/asd/
http://anditya.staff.telkomuniversity.ac.id/penggu
naan-software-versioning-di-kelas-pemrograman
Understanding
Data Structure and Algorithm

14 7/26/2018
Organizing Data
data structure is meant to be
– an organization for a collection of data items.
– a way of organizing input data and operations which
can be performed on this data

Organized data must be able to be searched, processed


in any order, or modified
The choice of data structure and algorithm can make the
difference between a program running in a few seconds
or many days.

15 7/26/2018 CSG2A3 – Algoritma Struktur Data


Why Data Structure?
In computer science, often the question is not
how to solve a problem, but how to solve a
problem well
In this case, it means Efficiency
Data structure is one of fundamental items to
develop a good computer systems
– You’ll learn Computer efficiency more deeply at other
subject
(Design and Analysis of Algorithms)

16 7/26/2018 CSG2A3 – Algoritma Struktur Data


Space-Time Tradeoffs and Efficiency
trade-off between speed and memory
To make a more powerful computers  more
complex applications.
More complex applications demand more
calculations

17 7/26/2018 CSG2A3 – Algoritma Struktur Data


Selecting a Data Structure
Analyze the problem to determine the resource
constraints a solution must meet.
Determine the basic operations that must be
supported. Quantify the resource constraints for
each operation.
Select the data structure that best meets these
requirements

18 7/26/2018
Data structure classification
Linear data structure
– Stack
– Queue

Non-linear data structure


– Tree
– Graph

19 24/8/08
Course Outcome
To be able to choose the best data structure for a
case
Understand the process and implementation of
linked list structure
Implementing linked list data structure to a real
case : stack, queue, tree, graph

20 7/26/2018
Visit

21 7/26/2018
Question?
23 7/26/2018
Programming and logic is depend on
how often you practice

24 26/07/2018
25 26/07/2018
Exercise
Write an algorithm to compute the formula down

Example
– Input a : 2
– Input b : -3
– Input c : 1
– Output x1 : 1
– Output x2 : 0.5

26 26/07/2018
Exercise
Write an algorithm to raise any number to any
power.
example
– Input number : 2
– Input power : 3
– Output : 8

27 26/07/2018
Exercise
Write an algorithm that determines the type of a
Triangle given the size of the three sides
Example
– Input Side 1 : 4
– Input Side 2 : 6
– Input Side 3 : 4
– Output : isosceles

28 26/07/2018
Exercise
Write an algorithm to receive input number from
user until user input = 9999. The program will
output the minimum number inputted
Example
–3
–6
–2
–6
– 9999
– Output : 2

29 26/07/2018
Exercise
Write an algorithm to receive input number from
user until user input = 9999. The program will
output the minimum number inputted
Example
–3
–6
–2
–6
– 9999
– Output : 2

30 26/07/2018
Exercise
program temperatur converter [farenheit ->
celcius]
– C = (F - 32) * 5/9
– buatlah program untuk mengubah input suhu farenheit
menjadi celcius
– program akan menerima 3 buah input angka real dari user
– program akan mengoutputkan hasil perubahan suhu
ketiga inputan

31 26/07/2018
Exercise
buatlah program untuk menghitung indeks nilai
– Input 3 nilai : UTS, UAS, kuis
– Hitung nilai akhir = 35% UTS + 35% UAS + 30% kuis
– Tampilkan index nilai sesuai aturan
 A : 80 - 100
 AB : 75 - 79.99
 B :70 - 74.99
 BC : 60 - 69.99
 C : 50 - 59.99
 D : 40 - 49.99
 E : 0 - 39.99

32 26/07/2018
Exercise
Create an algorithm to draw a diagonal
Example :
– Input 5
– Output
-- - - x
-- - x –
-- x - -
-x - - -
x----

33 26/07/2018
34 26/07/2018
Github.com
Create github.com account
Install github for windows
Open github.com/ASD-ADF
Fork a repository
Clone the repository to your PC
Modify the file(s) with your solution to complete the task
Add the files using : git add .
Commit the modification using : git commit –m “message”
Push the modification using : git push
Create a pull request
At the due date I will close the request with message

35 26/07/2018
Home Task
Install a C++ IDE or compiler program
– At lab works we use Code::Blocks IDE

Create an empty Cpp project

36 7/26/2018
Home Task - Simple Calculator
Create a simple calculator program that ask input
operan1, operan2, and operator from user and
output the result
Make the program ask if the user wants to do the
calculation again and loop the program

37 26/07/2018
Learn to Code
Learn programming using C-family programming
language
Get used to it :
– operators ( ==, !=, ++, --, +=, -=, *=, etc )
– Starts array and increment from 0
– Use
 For ( int I = 0; I < 10; I++ )
– Rather than
 For ( int I = 0; I <= 9; I++ )

38 26/07/2018
Learn to Code

39 7/26/2018
THANK YOU
7/26/2018
40

S-ar putea să vă placă și