ASSIGNMENTPRESENTED BY: SHAN NITISH BHIM DEVINA ARSHAD (didn’t gave notes + not presenting)
PRESENTING ON:ALGORITHMS TO INSERT AND DELETE DATA INTO/FROM:-STACKS-QUEUESLINKED LISTS:-INITIALISATION-INSERTION OF DATA-DELETION-SEARCHING OF DATA ELEMENTS
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.
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.
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.
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)
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)
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.
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.
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.
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.