0% found this document useful (0 votes)
6 views3 pages

00 - Course Intro

The CS 261 course focuses on the importance of data structures in programming, emphasizing that well-organized data leads to efficient and maintainable programs. Students will learn foundational data structures, analyze their complexity, and understand trade-offs in their use. The course also covers abstract data types, C programming, and source code management with Git and GitHub.

Uploaded by

Prathyusha M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

00 - Course Intro

The CS 261 course focuses on the importance of data structures in programming, emphasizing that well-organized data leads to efficient and maintainable programs. Students will learn foundational data structures, analyze their complexity, and understand trade-offs in their use. The course also covers abstract data types, C programming, and source code management with Git and GitHub.

Uploaded by

Prathyusha M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS 261 Course Intro

[T]he difference between a bad programmer and a good one is whether [s]he
considers his[/her] code or his[/her] data structures more important. Bad
programmers worry about the code. Good programmers worry about data
structures and their relationships.

-Linus Torvalds, creator of the Linux kernel, in a message to the Git mailing list

● As the Torvalds quote above suggests, the way data is stored and organized
within a running program is one of the most important elements of that program
and will largely determine how good the user’s experience of the program is.
Well-structured data leads to programs that are efficient (i.e. consume fewer
resources) and are easier to understand and maintain.

● To understand the impact of data storage and organization, think for a few
minutes about the following problem. Try to come up with a good solution to the
problem, and importantly, try also to characterize the way your solution behaves
in terms of resource consumption (e.g. how much processing time is needed to
perform particular operations in your solution, and how much space is consumed
by the structures in your solution as more and more data is added to them?).
○ Imagine you’re a developer on a team implementing an exciting web
application. One of the most important features of your application is its
search functionality. Specifically, at the top of every page within the
application is a search box, where users can type a search query to find
content in your application related to that query.
○ Your team lead has asked you to add an autocomplete feature to this
search box. This feature will behave much like Google’s autocomplete
feature. Specifically, as the user types in the search box, the application
will present to them a set of suggested ways to complete the query they’re
typing, and instead of finishing typing out their whole query, the user can
just select one of the suggestions presented to them. If there are a lot of
possible suggested completions that match the query being typed, only
the top ones will be presented.
○ The data for this feature is already compiled and provided to you in an
alphabetically-sorted text file that contains one completion per line.
○ Now it’s up to you to figure out how you are going to store and use that
data in your running web application. How will you do it?
● Data structures, broadly, are general-purpose mechanisms for storing,
organizing, and managing data within a running program.
○ The term “data structure” also encapsulates the operations associated
with a particular structure, for example the way data is inserted, accessed,
and manipulated within the structure.

● Importantly, a given data structure represents not only the stored data itself, but
also often represents the relationships between specific data elements.

● Data Structures is one of the most important courses you’ll take as an


undergraduate if you plan to move on to do any kind of programming in your life.
Indeed, because of the importance of well-organized data and because people
don’t often study data structures when they’re learning to program on their own,
you can think of this course as where you move from being a hobbyist
programmer to a budding professional programmer.

● In this course, we’ll have two primary goals:


○ To become familiar with a collection of foundational data structures that
you’ll use frequently as a programmer and that will be useful in a wide
variety of contexts.
■ E.g. lists, queues, stacks, trees, hash tables, graphs, etc.
○ To understand how to analyze and manage the complexity associated
with data structures and their operations.
■ This will allow us to keep our programs’ running times and memory
usage under control.

● None of the data structures we’ll see in this class (nor any that we won’t see in
class) is a perfect data structure for all situations. Each one involves trade-offs in
terms of the following things:
○ How long its operations take to run.
○ How much space it requires to store a collection of data of a given size.
○ How hard it is to implement.

● With the understanding you’ll gain in this class about data structures and how to
analyze them, you’ll be able to compare data structures and choose/design the
best one for a particular task.

● Along the way, we’ll also learn a few other things:


○ Abstract data types (ADTs) vs. data structures.
■ ADTs are data types modeled from the point of view of the user of
that data type (e.g. a C++ programmer using a data structure from
the C++ STL).
● For example, a hash table can be implemented with either a
list or an array. The user of the hash table doesn’t need to
know (or care about) how it’s implemented, only how it
behaves.
■ Data structures are concrete representations of data, i.e. a data
type from the point of view of the implementer.
○ C programming
○ Git and GitHub to manage our source code.

You might also like