A Search Algorithm ?My-Search? To Find Elements
Journal: International Journal of Science and Research (IJSR) (Vol.4, No. 4)Publication Date: 2015-04-05
Authors : Bishnu Charan Behera;
Page : 2540-2540
Keywords : MY-SEARCH; LINEAR SEARCH; TIME COMPLEXITY; EXECUTION;
Abstract
THIS IS A 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 -MYSEARCH 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 ITESELF. 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.
Other Latest Articles
- Modeling and Control of the Crude Atmospheric Unit in Khartoum Refinery
- A Comparison of Spatial&Frequency Domain Fusion Methods
- Efficient Technique for Network Lifetime Enhancement by Cleaning Dirty Data
- Evaluation of the Effect of Previous Cultural of Sugar Beet on the Viral Inoculum Load of ?Beet Necrotic Yellow Vein Virus? in Morocco
- Communication between Multiple Resources Using Arbiter Design
Last modified: 2021-06-30 21:44:39