絞り込み条件を変更する
検索条件を絞り込む

すべてのカテゴリ

3 件中 1 - 3 件表示
カバー画像

Data structure, part 2

Linked listA linked list is a structure that collects multiple data like an array, but the orderof the data is not always a continuous area of memory. The pointer points tothe next data storage location. There are the following types of linked lists:(1)Singly-linked listA singly-linked list is a list in which pointers are concatenated in only onedirection. In the figure below, the route represents the start position andfollows the address pointed to by the pointer. In case of this list, you cansearch the data only in the order of "A→B→C".If you want to add data to the list, you change the value of the pointer. In thefigure below, the pointer of B is changed to 30, and the pointer of Z is cha
0
カバー画像

Data structure, part 3

Tree structureA tree structure is a data structure that expresses the hierarchical relationshipbetween elements. It is suitable for expressing relationships branchedbetween data.node:Area for storing data.(Element part of the tree structure)branch:Line connecting the node.(Connect elements)root node:The first node without a parent node.leaf node:Terminal node without a child node.In addition, there are several types of tree structures, so I will introduce them.(1)Binary treeA binary tree is a tree that has two or less children in each node. Distinguishthe two children like the left child and the right child, respectively. The partrooted on the left child is called the left subtree, and the p
0
カバー画像

Data structure

As defined as "data structure + algorithm = program", they are closely relatedto each other. If you use the right data structure for your processing, you willmake a good program.Basic data structureI will introduce the basic data structures prepared in most programminglanguages.①Basic data typeThis is a data type that stores a single underlying piece of data.Let me give you some examples.・Integer type:Only be assigned integer values.・Real numeric type:Only be assigned integers and decimals.・Character type:Only be assigned characters.・Boolean type:Only be assigned one of two, true and false.・Structure type:Handle multiple variables together.②Array typeThis is a data structure that collects mu
0
3 件中 1 - 3