Today's Study(Search Algorithms)steemCreated with Sketch.

in hive-161179 •  2 years ago 

Hi, Everyone. This is @neko9!!
Today we will study search algorithms.

You studied the wood structure with me in a previous article.
Now it's time to explore that tree structure! (It's kind of exciting to hear the word "search," isn't it?)
↓previous article
https://steemit.com/hive-161179/@neko9/today-s-study-tree-structure

There are two explorations we will be studying

①linear search method

This method searches data sequentially from the top.
*A method that is particularly effective for unorganized data.

image.png

In this instance, that's the fifth one you'll find!
By the way, the average number of comparisons is (number of data + 1) / 2.

The linear search method also includes the "Banbei method," which simplifies the end of the search by adding the data to the end of the search.

image.png

②Two-minute search

This is a method of repeating the process of comparing just the median of the number of data with the data you want to explore.
This method is effective for data that is organized.

image.png

By the way, the average number of comparisons is log2N.

Huh? Then what about the average number of comparisons if there is no data to explore? I guess.
Rest assured, of course there is a way to calculate it!

average number of comparisons = (N + 1) / 2 * (1-a) + Na
(1) a = Probability of no search data

Oops, that was quite long.
I was going to write up to the study of the hash method, but let's leave that for the next time.

See you all in the next Today's Study.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

@neko9 さん、こんにちは。
image.png

💡 アップボートガイド 💡

tomoyan.witnessに投票お願いします👇

https://steemitwallet.com/~witnesses

分からない事は何でも質問して下さい🙇