4009 DSA_Week1 Course Overview & Java Basics
4009 DSA_Week1 Course Overview & Java Basics
Questions to ponder:
◦ What are some examples of data structures you already know about from your Java
course?
Many algorithms apply directly to specific data structures, you need to know how to:
◦ insert a new data item
◦ search for a specific item
◦ delete a specified item
◦ iterate through all the items in a data structure
◦ sort through items in a data structure
Questions to ponder:
◦ What’s an example of an algorithm?
◦ How can the design of an algorithm affect performance? How can it affect memory?
Sort – Algorithm
Search – Algorithm
◦ Scalability:
◦ Would your method work for a hundred recorded? A thousand or a million?
◦ Would your method permit quick insertion of a record or deletion of an old record?
◦ How big will each records be and how should be stored?
Important: Data Structures can be HUGE!!! What are some example scenarios where we need large data
structures?
Now the issue of scalability comes into play. Suppose I design a reusable component for (i.e.) sorting an
array of records by last name. I’m going to distribute this on the internet.
For example, what could the following This type of structure is called an
represent: ‘undirected graph’
Example applications:
• Grocery store lines
• Traffic (Queues are actually used when determining timing of
traffic lights!! How? Let’s think about it)
c
o rows
l
u
m
n
What is the ‘database’ in the case of a collection of index cards and names/phone
#s?
Employee
Number
1
2
3
4
Note: In Java, individual variables within an object represent data fields. Also fields within
a class object are called fields in Java
Identity the different comments used, use of base types and avoid use of reserve words.