More Subjects
Pseudo code
Student’s Name
Institution
Date
Table of Contents
TOC \o "1-3" \h \z \u 1.0.Pseudo Code PAGEREF _Toc30516898 \h 2
2.0.Hash table PAGEREF _Toc30516899 \h 2
3.0.Insert and remove PAGEREF _Toc30516900 \h 2
4.0.References PAGEREF _Toc30516901 \h 4
Pseudo Code
The pseudo code is regarded as the notation of resembling of a simplified programming language which is used in program designs. It can be written an individual programmer wants but it cannot be compiled or run like other regular programming CITATION Amy14 \l 1033 (Dalal, 2014). However, sometimes pseudo code syntax can be used to ensure that everyone understanding the coding system or the program. The use of pseudo code is made easy by starting using algorithm before transcribing into computer language and also using indent when closing instruction with a condition clause.
Hash table
The hash table is implemented using two steps, first by converting element into an integral using hash function and by retrieving using hashed key. Therefore, the hash function is used for implementation of remove and insert in java language.
Insert and remove
However, in programming using java programming language, insert is used in pseudo code to create a tree to make it easier to sort the program CITATION Leu15 \l 1033 (Leung, 2015). The insert of value is done at the lowest point or to the left. It is therefore, important in solving problems in terms of actions and therefore, the process can be easily used to create flowcharts, Unified Modified Language (UML) and drakon-charts. It therefore, allows a programmer to focus on the program without being distracted with any details. The n nodes are therefore, build or created within the rank or the flow to ensure that there is a proper logic flow of the program. For instance, the listed below illustrates how insert and remove is done on pseudo code:
Let: n = # nodes in heap of height h
2h - 1 < n ≤ 2h+1 − 1
<===> 2h < n + 1 ≤ 2h+1
<===> h < lg (n + 1) ≤ h+1
===> Height of heap ~= lg (n + 1)
However, the pseudo code is used to ensure that all elements are put into a heap CITATION Mah17 \l 1033 (Mahmud, Rana, Hossin, & Jahan, 2017). It is the best method which can be used to create a good heap, to make a program state and sufficient. Therefore, pseudo code is the detail description of what a computer algorithm must perform in a formal styled natural language instead of using a programming language.
References
BIBLIOGRAPHY Dalal, A. C. (2014). Searching and Sorting Algorithms. International Journal of ICT and
Business , 2-35.
Goodrich, M. T. (2017). Data Structures and Algorithms in Java: Department of Computer
Science University of California, Irvine . New York: Pearson.
Leung, Y. L. (2015). Linear Data Structures: Linked Lists, Stacks,and Queues in JS.
https://www.freecodecamp.org/news/linear-data-structures-linked-lists-stacks-and-queues-in-javascript-a13c7591ad87/ , 12-35.
Mahmud, H., Rana, S., Hossin, A., & Jahan, H. (2017). MinFinder: A New Approach in Sorting
Algorithm. International Congress of Communication technology , 2-35.
More Subjects
Join our mailing list
© All Rights Reserved 2024