• Like
Assignment 2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Published

 

Published in Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
285
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ASSIGNMENTPRESENTED BY:
    SHAN
    NITISH
    BHIM
    DEVINA
    ARSHAD (didn’t gave notes + not presenting)
  • 2. PRESENTING ON:ALGORITHMS TO INSERT AND DELETE DATA INTO/FROM:-STACKS-QUEUESLINKED LISTS:-INITIALISATION-INSERTION OF DATA-DELETION-SEARCHING OF DATA ELEMENTS
  • 3. STACKS
    A stack is a container of abstract data or structure data that are inserted and removed according to the principle of LAST IN FIRST OUT (LIFO). The object can be inserted at any time but only the last object can be removed. It is mainly based on the push and pop operation.
    PUSH OPERATION:
    It add data to the top of the list, hiding any item already on the stack.
    POP OPERATION:
    It removes an item from the top of the lists.
  • 4. EXAMPLE OF PUSH AND POP:
  • 5. QUEUES
    • AQueue differ from a stack. A queue is a particular kind of collection in which the entities are kept in order and principle of FIRST IN FIRST OUT (FIFO) data structure.
    • 6. FIFO:
    In FIFO the first element added to a queue will be the first one to be removed.
    • ENQUEUE:
    It is element that are inserted at the rear.
    • DEQUEUE:
    It is element that are removed at the front.
  • 7. EXAMPLE OF ENQUEUE AND DEQUEUE:
  • 8. LINKED LISTS
    • In computer science, a linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference (i.e., a link) to the next record in the sequence.
    • 9. Linked lists and arrays are similar since they both store collections of data. The terminology is that arrays and linked lists store "elements" on behalf of "client" code. The specific type of element is not important since essentially the same structure works to store elements of any type. One way to think about linked lists is to look at how arrays work and think about alternate approaches.
  • INITIALISATION(To assign a value to a variable or storage location in a computer program)
    Initialization in computing is the setting (or “formatting”) of a variable to some initial value, either by statically embedding the value at compile time, or else by assignment at run time. A section of code that performs such initialization is generally known as “initialization code” and may include other, one-time-only, functions such as opening files. Setting a memory location to hexadecimal zeroes is also sometimes known as “clearing” and is often performed by an exclusive or instruction (both operands specifying the same variable), at machine code level, since it requires no additional memory access.
  • 10. INITIALISATION (CONTD.)
    Certain linked list operations (init, insert, etc.) may change element at start of list (what ListStart points at)
    • to change what ListStart points to could pass a pointer to ListStart (pointer to pointer)
    • 11. alternately, in each such routine, always return a pointer to ListStart and set ListStart to the result of function call (if ListStart doesn’t change it doesn’t hurt)
    EPtr initList() {
    return NULL;
    }
    ListStart = initList();
  • 12. FIRST EXAMPLES OF INITIALISATION:
  • 13. SECOND EXAMPLE OF INITIALISATION
  • 14. INSERTION OF DATA:
    It is a methods followed in arranging a set of data items into a sequence according to precise rules.
    A formula used to record data into anew sequence. Like all complicated problems, there are many solution that can achieve the same result, and one sort algorithm can re sequence data faster than another.
  • 15. EXAMPLES OF INSERTION OF DATA:
  • 16. DELETION
    • Deletion is act of deleting or removing by striking out material such as a word or passage that has been removed from a written body.
    • 17. TYPES OF DELETION:
    SPEEDY DELETION
    PROPOSED DELETION
  • 18. SPEEDY DELETION
    This is meant to be used in uncontroversial cases. The main reason articles are speedily delete are for being extremely short on material or context.
  • 19. PROPOSED DELETION
    This type of deletion is used to delete an article in seven days if no one objects. Proposed deletion should only be used for uncontroversial deletion nomination, it should not be used as a way of getting an article deleted.
  • 20. EXAMPLES OF DELETION
  • 21. SEARCHING OF DATA ELEMENTS
    In computer, a search algorithm, broadly speaking, is an algorithm for finding an item with specified properties among a collection of item. The items may be stored individually as a record in a database or may be elements of a search space defined by a mathematical formula or procedure.
  • 22. THANK YOU FOR YOUR ATTENTION