Applications of Data Structures
Applications of Data Structures
Linked List:[
A polynomial can be represented in an array or in a linked list by simply
storing the coefficient and exponent of each term.
DMA
1. Can be used to implement Stack, Queue’s, Tress, Graphs efficiently. (and
there are plenty of uses of all these)
2. When you want to insert an element in array it needs lot of shifting. But in
linked list its very easy.
3. Image viewer! (next and previous button. the next and previous images are
linked there
4. A blockchain (e.g. bitcoin ) is a linked list data structure.
5. The famous lisp programming language where everything is list. Lisp means list
processing.
6. List form the basis of processing (recursion and pattern matching) in
functional programming (e.g Haskell) e.g. x::xs pattern matches to x as head
of list and xs as rest of list hence giving a nice way to recurse and process.
7. Lift in the Building.
Stack Applns:-
Real World applications in which order of Object matters stack are used for an example
in following situation Stack is used
Undo
Back Forward
Reverse word
BFS
Ticket Counters
Graph:-
Few important real life applications of graph data structures are:
1. Facebook: Each user is represented as a vertex and two people are friends
when there is an edge between two vertices. Similarly friend suggestion also
uses graph theory concept.
2. Google Maps: Various locations are represented as vertices and the roads are
represented as edges and graph theory is used to find shortest path between
two nodes.
3. Recommendations on e-commerce websites: The “Recommendations for you”
section on various e-commerce websites uses graph theory to recommend
items of similar type to user’s choice.
4. Graph theory is also used to study molecules in chemistry and physics.
Tries
Tries are an extremely special and useful data-structure that are based on the prefix of a
string. They are used to represent the “Retrieval” of data and thus the name Trie. A Trie is
a special data structure used to store strings that can be visualized like a graph.
Searching trees in general favor keys which are of fixed size since this leads
to efficient storage management.
•However in case of applications which are retrieval based and which call for
keys
varying length, tries provide better options.
•Tries are also called as Lexicographic Search trees.
Crawling
Crawling is where it all begins – the acquisition of data about a website. This involves
scanning the site and getting a complete list of everything on there – the page title,
images, keywords it contains, and any other pages it links to – at a bare minimum.
Modern crawlers may cache a copy of the whole page, as well as look for some additional
information such as the page layout, where the advertising units are, where the links are
on the page (featured prominently in the article text, or hidden in the footer?).
Indexing
You’d be forgiven for thinking this is an easy step – indexing is the process of taking all
of that data you have from a crawl, and placing it in a big database. Imagine trying to a
make a list of all the books you own, their author and the number of pages. Going
through each book is the crawl and writing the list is the index. But now imagine it’s not
just a room full of books, but every library in the world. That’s pretty much a small-scale
version of what Google does.
All of this data is stored in vast data-centres with thousands of petabytes worth of
drives. Here’s a sneaky peak inside one of Google’s:
The last step is what you see – you type in a search query, and the search engine
attempts to display the most relevant documents it finds that match your query. This is
the most complicated step, but also the most relevant to you or I, as web developers and
users. It is also the area in which search engines differentiate themselves (though, there
was some evidence that Bing was actually copying some Google results). Some work
with keywords, some allow you to ask a question, and some include advanced features
like keyword proximity or filtering by age of content.
“”