Summary

SUMMARY

Linked-list
single Linked List
is a data structure consisting of nodes. which together form a sequence. In its most basic form, each node contains data and a reference (in other words, a link) to the next node in the sequence. This structure allows for efficient insertion or removal of elements from any position in the sequence during iteration. More complex variants add additional links, allowing more efficient insertion or removal of nodes at arbitrary positions. A drawback of linked lists is that access time is linear (and difficult to the pipeline). Faster access, such as random access, is not feasible. Arrays have better cache locality compared to linked lists.
Stack:
In the pushdown stacks only two operations are allowed: push the item into the stack, and pop the item out of the stack. A stack is a limited access data structure - elements can be added and removed from the stack only at the top. push adds an item to the top of the stack, pop removes the item from the top. A helpful analogy is to think of a stack of books; you can remove only the top book, also you can add a new book on the top.
Queue:
An excellent example of a queue is a line of students in the food court of the UC. New additions to a line made to the back of the queue, while removal (or serving) happens in the front. In the queue, only two operations are allowed enqueue and dequeue. Enqueue means to insert an item into the back of the queue, dequeue means removing the front item. The picture demonstrates the FIFO access. The difference between stacks and queues is in removing. In a stack we remove the item the most recently added; in a queue, we remove the item the least recently added.
Infix, Postfix, and Prefix:
Are Notations that show how many data are represented.
in infix notation, e.g. a - b + c, where operators are used in-between operands.
in prefix operator is prefixed to operands, i.e. operator is written ahead of operands.
In postfix notation style, the operator is postfixed to the operands i.e., the operator is written after the operands
Hashing:
Hashing is the transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items in a database because it is faster to find the item using the shorter hashed key than to find it using the original value. It is also used in many encryption algorithms.






Komentar

Postingan populer dari blog ini

Binary Search Tree

AVL Tree & B-Tree