5 Feb 2023

197

Binary Search on Arrays and Linked Lists

Format: APA

Academic level: College

Paper type: Essay (Any Type)

Words: 801

Pages: 3

Downloads: 0

Part 1 

Binary search trees are types of containers in data structures that store items like names or numbers in memory. They are used to facilitate a fast lookup or search to remove or add items in an array by using their keys. The keys are sorted in order so that the binary search can be applied from left to right or from bottom to top. The searching allows for comparison that is equivalent to half of the number of items in an array. This property makes binary search tree quicker and better than linear search. Each search, deletion or lookup takes the time that is directly proportional to the elements stored in the array ( Lafore, 2017) . Array elements are stored form index 0 onwards. The first character of the array is at a position called index 0. An element at index 4 has four characters before it. In an array of n elements, the minimum index is 0, and the maximum index is n-1. A guess is calculated on the average of minimum and maximum. The value is rounded down to obtain a whole number. If the array guess is equivalent to the target element, then the binary search stops. If the guess is lower than the target, then the guess is set at plus 1. If the guess is higher than the target, then it is set at minus 1. The process is repeated until the target element is found. 

A linked list has a single next reference while a binary tree has two next references. During a binary search, the linked list has a longer path or number elements to travel through than a binary tree ( Michu, DELHI, Michu, & DELHI, 2018) . Elements are stored in nodes, and each node keeps track of its immediate child element. Each node points to the left and right child nodes using the binary tree. If there is no left or right child, the pointer is equivalent to NULL. A pointer is required to point to the root of the tree to keep track of all the elements in the tee. 

It’s time to jumpstart your paper!

Delegate your assignment to our experts and they will do the rest.

Get custom essay
Illustration
Cite this page

Select style:

Reference

StudyBounty. (2023, September 16). Binary Search on Arrays and Linked Lists.
https://studybounty.com/binary-search-on-arrays-and-linked-lists-essay

illustration

Related essays

We post free essay examples for college on a regular basis. Stay in the know!

Security Implication of the Internet of Things

The Internet of Things (IoT) can be described as s system of interconnected devices that have the ability to transfer information over a computer network without the need of human-to-computer or human-to-human...

Words: 892

Pages: 3

Views: 96

Modern Day Attacks Against Firewalls and VPNs

Introduction The need to have an enhanced security of the computer connectivity happens to be one of the reasons that attract companies and organizations towards wide usage of VPNs. Several simple techniques...

Words: 2025

Pages: 7

Views: 134

How to Deploy and Administer Windows Server 2012

Securing a reliable, and expandable configuration for a company is important to build a strong network. The new and enhanced features of the Windows Server 2012 can be used to implement the network. In this...

Words: 1673

Pages: 6

Views: 88

Deployment Model in Cloud Computing

Deployment model is a representation of a cloud environment primarily distinguished by parameters such as accessibility, proprietorship, and storage size. The National Institute of Standards and Technology gives the...

Words: 254

Pages: 1

Views: 82

How to Use Web Search Engines for Business Research

The advancement of technology has made it possible for many people around the world to have easy access to information whenever they want. The development of the Wide World Web-enabled different kinds of information...

Words: 773

Pages: 3

Views: 87

Distributed Database Management System (DDBMS)

Introduction Data management has been a headache to many technology enthusiasts for quite a long period of time. They have successfully managed to logically collect interrelated data and share it. If the data is...

Words: 799

Pages: 3

Views: 128

illustration

Running out of time?

Entrust your assignment to proficient writers and receive TOP-quality paper before the deadline is over.

Illustration