article Open access

A Search Algorithm

  • Journal of Applied & Computational Mathematics
  • OMICS Publishing Group
Research footprint

At a glance

Citations
1
References
3
Comments
0
Paper overview

Abstract

This is an algorithm which has the same time complexity as that of linear search of “O (n)”. But still it is better than “linear search” in terms of execution time. Let A[ ] be the array of some size N. If the element which we want to search is at any position before “N/2” than “my-search and linear-search” both will have execution time, but the magic happens when the search element is after “N/2” position. Suppose the element want to search is at nth position, then using the linear search will find the element after nth iteration, but using “my-search” we can search the element after 1st iteration itself. Elements in (N-i)th position can be found in the (I+1)th iteration i.e. suppose size is 1000 than element in 1000th position can be found in 1st iteration, similarly 999 in 2nd iteration and process goes on like this.

Record transparency

Publication details

DOI
10.4172/2168-9679.1000322
OpenAlex
W2528702987
Document type
article
Language
EN
Source
Journal of Applied & Computational Mathematics
Last metadata update
Community

Comments

Log in to join the discussion.

  1. No comments yet. Start the discussion.