Beruflich Dokumente
Kultur Dokumente
&
Algorithms
Why Data structure:
Data structure are way to organize information such a way that we can
access it, manipulate it and transform it to information.
Data structure help to perform operation in efficient way
Data structure make common operations fast.
Data structure make operation possible.
Minimum about of space and represent the complexity of information in
intuitive way.
Some Examples:
Set might useful while searching the unique information like users in system.
HashTable used in compiler itself for runtime binding.
Stacks are used in Undo functionality, Browser back operation supported by stack.
Index data structure such as Suffix tree or Inverted Index are used in search engine indexing.
Graph are used to represent relationship such as on social networking sites
Data structure influence algorithms as much as algorithms influence the design of data structure.
Performance:
Performance is measured along resource consumption.
Improving code performance beyond a certain point involves tradeoffs.
o Consuming more of one resource can help consume less of another.
Measure of performance
o Time
o Space
o Network
Complexity:
Complexity is a measure of how resource requirements change as the size of the problem
gets large.
Complexity affects performs.
The higher the complexity of a problem the lower the performace
The basic building blocks of the complexity are the read, write, assignment etc. operations
o We actually don’t worry about the exact number of operation. We think from the
prespective of the input size. If the input size increases, what will be the number of
building block operations which will impact the performance.
We also focus on the worst case performance.