Postingan

Menampilkan postingan dari 2020
Gambar
M. Daffa Syamsuddin 2301957603 Summary Array and Pointers In computer programming, an array of pointers is an indexed set of variables, where the variables are pointers (referencing a location in memory). Pointers are an important tool in computer science for creating, using, and destroying all types of data structures. An array of pointers is useful for the same reason that all arrays are useful: it allows you to numerically index a large set of variables. Linked List Below is an array of pointers in C that points each pointer in one array to an integer in another array. The value of each integer is printed by dereferencing the pointers. In other words, this code prints the value in memory of where the pointers point. Linked list is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequ...

GSLC Data Structures 03

Gambar
Hashing Table & Binary Tree Binary Tree     A binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. It is implemented mainly using Links. Binary Tree Representation      A tree is represented by a pointer to the topmost node in tree. If the tree is empty, then value of root is NULL. A Binary Tree node contains following parts : 1. Data 2. Pointer to left child 3. Pointer to right child HashingHash Function        A function that converts a given big input key to a small practical integer value. The mapped integer value is used as an index in hash table. A good hash function should have following properties. 1) Efficiently computable. 2) Should uniformly distribute the keys. Hash Tree on Blockchain      A tree in which every leaf node is labelled with the cryptographic ...

GSLC Data Structure

GSLC DATA STRUCTURES M. Daffa Syamsuddin (2301957603       Linked list  is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element  points  to the next. It is a  data structure  consisting of a collection of  nodes  which together represent a  sequence .      Why Linked List? Arrays can be used to store linear data of similar types, but arrays have the following limitations. 1) The size of the arrays is fixed: So we must know the upper limit on the number of elements in advance. Also, generally, the allocated memory is equal to the upper limit irrespective of the usage. 2) Inserting a new element in an array of elements is expensive because the room has to be created for the new elements and to create room existing elements have to be shifted.      A linked list is a dynamic data structure. The number ...