精华内容
下载资源
问答
  • 针对 RFID 阅读过程中的标签碰撞问题,在二进制树型搜索算法的基础上提出了一种优化的反碰撞算法.该算法通过构建新的请求建立方式,采用两位数仲裁碰撞进行逐位的识别,大大减少了碰撞检测时相应标签的数量,从而减少了...
  • 二进制搜索算法

    千次阅读 2020-05-19 23:20:52
    : 一种常用的算法二进制搜索。 如果您还不知道,请继续阅读。 非常有帮助。 节省大量CPU。 以指数方式减少计算。 当搜索大量信息以查找匹配项时,想到的第一个想法是线性搜索。 遍历所有值以查找匹配项。 如果...

    为什么?:

    一种常用的算法是二进制搜索。

    如果您还不知道,请继续阅读。

    非常有帮助。 节省大量CPU。 以指数方式减少计算。

    当搜索大量信息以查找匹配项时,想到的第一个想法是线性搜索。 遍历所有值以查找匹配项。 如果找到它,请返回位置或值,然后结束搜索。

    然而,当要搜索的值变得非常大时,这变得非常低效。 这是O(N)算法。 在更坏的情况下,您可能必须搜索所有值以找到匹配项,甚至更糟的是找到不存在的匹配项!

    怎么样?:

    项目列表是否可以数字或ASCII排序。 使用二进制搜索!

    首先,对列表进行排序,然后将最中间的值(如果列表元素不均匀,则向上或向下)与搜索词进行比较。 如果它是“少于”您的用语,则说明它一定是

    低于那个点。 这样就可以消除上限。 如果该术语的值大于中心点的值,请消除该较低的范围。

    因此将要搜索的项目数量减少了一半。

    将此技术连续应用于其余项目,并将每次迭代的搜索量减少一半。

    因此以更快的O(log N)算法运行。

    示例: 警告 :使用“递归”,切记要考虑CPU上的函数调用负载。 在某些语言中,这实际上可能比线性慢。 请参阅下面的非递归。

    (摘自

    维基百科
    
    BinarySearch(A[0..N-1], value, low, high) {
           if (high < low)
               return -1 // not found
           mid = low + ((high - low) / 2)  // Note: not (low + high) / 2 !!
           if (A[mid] > value)
               return BinarySearch(A, value, low, mid-1)
           else if (A[mid] < value)
               return BinarySearch(A, value, mid+1, high)
           else
               return mid // found
       } 
    这里有一个优化。

    有时在处理大量数字或浮点数时精度很高。

    中=(低+高)/ 2

    可能会溢出并占用内存,从而导致结果不可靠。

    中=低+((高-低)/ 2)

    解决它。 :)

    看到这里... 非递归:
    
    low = 0
           high = N
           while (low < high) {
               mid = low + ((high - low) / 2)  // Note: not (low + high) / 2 !!
               if (A[mid] < value)
                   low = mid + 1; 
               else
                    //can't be high = mid-1: here A[mid] >= value,
                    //so high can't be < mid if A[mid] == value
                    high = mid; 
           }
           // high == low, using high or low depends on taste 
           if ((low < N) && (A[low] == value))
               return low // found
           else
               return -1 // not found       

    这个最基本的算法有很多资源。 只需在Google中输入“二进制搜索”即可。

    祝您编程愉快。

    From: https://bytes.com/topic/algorithms/insights/867454-binary-search-algorithm

    展开全文
  • 二进制树型搜索算法 二进制搜索算法 (Binary Search Algorithm) Binary Search is applied on the sorted array or list of large size. It's time complexity of O(log n) makes it very fast as compared to ...

    二进制树型搜索算法

    Binary Search is applied on the sorted array or list of large size. It's time complexity of O(log n) makes it very fast as compared to other sorting algorithms. The only limitation is that the array or list of elements must be sorted for the binary search algorithm to work on it.

    二进制搜索应用于排序后的数组或大型列表。 O(log n)的时间复杂性使其与其他排序算法相比非常快。 唯一的限制是必须对元素的数组或列表进行排序,以便二进制搜索算法可以对其进行处理。

    实现二进制搜索算法 (Implementing Binary Search Algorithm)

    Following are the steps of implementation that we will be following:

    以下是我们将要执行的实现步骤:

    1. Start with the middle element:

      从中间元素开始:

      • target value is equal to the middle element of the array, then return the index of the middle element.目标值等于数组的中间元素,则返回中间元素的索引。
        • If the target value is greater than the number in the middle index, then pick the elements to the right of the middle index, and start with Step 1.
        • If the target value is less than the number in the middle index, then pick the elements to the left of the middle index, and start with Step 1.
    2. When a match is found, return the index of the element matched.

      找到匹配项后,返回匹配元素的索引。

    3. If no match is found, then return -1

      如果找不到匹配项,则返回-1

    /*
        function for carrying out binary search on given array
        - values[] => given sorted array
        - len => length of the array
        - target => value to be searched
    */
    int binarySearch(int values[], int len, int target)
    {
        int max = (len - 1);
        int min = 0;
        
        int guess;  // this will hold the index of middle elements
        int step = 0;  // to find out in how many steps we completed the search
        
        while(max >= min)
        {
            guess = (max + min) / 2;
            // we made the first guess, incrementing step by 1
            step++;
            
            if(values[guess] ==  target)
            {
                printf("Number of steps required for search: %d \n", step);
                return guess;
            }
            else if(values[guess] >  target) 
            {
                // target would be in the left half
                max = (guess - 1);
            }
            else
            {
                // target would be in the right half
                min = (guess + 1);
            }
        }
     
        // We reach here when element is not 
        // present in array
        return -1;
    }
     
    int main(void)
    {
        int values[] = {13, 21, 54, 81, 90};
        int n = sizeof(values) / sizeof(values[0]);
        int target = 81;
        int result = binarySearch(values, n, target);
        if(result == -1)
        {  
            printf("Element is not present in the given array.");
        }
        else
        {
            printf("Element is present at index: %d", result);
        }
        return 0;
    }

    We hope the above code is clear, if you have any confusion, post your question in our Q & A Forum.

    我们希望上面的代码清晰明了,如果您有任何疑问,请在我们的“ 问答论坛”中发布您的问题。

    Now let's try to understand, why is the time complexity of binary search O(log n) and how can we calculate the number of steps required to search an element from a given array using binary search without doing any calculations. It's super easy! Are you ready?

    现在让我们尝试理解,为什么二分查找的时间复杂度为O(log n),以及如何在不进行任何计算的情况下使用二分查找来计算从给定数组中搜索元素所需的步数。 超级容易! 你准备好了吗?

    二元搜索的时间复杂度O(log n) (Time Complexity of Binary Search O(log n))

    When we say the time complexity is log n, we actually mean log2 n, although the base of the log doesn't matter in asymptotic notations, but still to understand this better, we generally consider a base of 2.

    当我们说时间复杂度是log n ,我们实际上是指log 2 n ,尽管对数的底数在渐进表示法中并不重要,但是为了更好地理解这一点,我们通常考虑2的底数。

    Let's first understand what log2(n) means.

    首先让我们了解log 2 (n)含义。

    Expression: log2(n) - - - - - - - - - - - - - - - For n = 2: log2(21) = 1 Output = 1 - - - - - - - - - - - - - - - For n = 4 log2(22) = 2 Output = 2 - - - - - - - - - - - - - - - For n = 8 log2(23) = 3 Output = 3 - - - - - - - - - - - - - - - For n = 256 log2(28) = 8 Output = 8 - - - - - - - - - - - - - - - For n = 2048 log2(211) = 11 Output = 11

    表达式:log 2 (n)---------------对于n = 2:log 2 (2 1 )= 1输出= 1------------ ---对于n = 4 log 2 (2 2 )= 2输出= 2----------------对于n = 8 log 2 (2 3 )= 3输出= 3-- --------------对于n = 2048 log 2 (n = 256 log 2 (2 8 )= 8输出= 8---------------- 2 11 )= 11输出= 11

    Now that we know how log2(n) works with different values of n, it will be easier for us to relate it with the time complexity of the binary search algorithm and also to understand how we can find out the number of steps required to search any number using binary search for any value of n.

    现在我们知道如何log 2 (n)与不同价值观的作品n ,这将是我们更容易与二进制搜索算法的时间复杂度有关,同时还应了解我们如何能够找出需要的步数使用二进制搜索n任何值来搜索任何数字。

    计算步数 (Counting the Number of Steps)

    As we have already seen, that with every incorrect guess, binary search cuts down the list of elements into half. So if we start with 32 elements, after first unsuccessful guess, we will be left with 16 elements.

    正如我们已经看到的,每进行一次错误的guess ,二进制搜索就会将元素列表缩减为一半。 因此,如果我们从32个元素开始,则在第一次失败的猜测之后,我们将剩下16个元素。

    So consider an array with 8 elements, after the first unsuccessful, binary sort will cut down the list to half, leaving behind 4 elements, then 2 elements after the second unsuccessful guess, and finally only 1 element will be left, which will either be the target or not, checking that will involve one more step. So all in all binary search needed at most 4 guesses to search the target in an array with 8 elements.

    因此,考虑一个包含8个元素的数组,在第一个不成功的二进制排序之后,将列表减半,剩下4个元素,然后在第二个不成功的猜测之后保留2个元素,最后只剩下1个元素,或者是否达到target ,检查将涉及更多步骤。 因此,所有二进制搜索最多需要4个猜测才能在具有8个元素的数组中搜索target

    If the size of the list would have been 16, then after the first unsuccessful guess, we would have been left with 8 elements. And after that, as we know, we need atmost 4 guesses, add 1 guess to cut down the list from 16 to 8, that brings us to 5 guesses.

    如果列表的大小为16,则在第一次不成功的猜测之后,我们将剩下8个元素。 然后,据我们所知,我们最多需要4个猜测,再加上1个猜测就可以将列表从16个减少到8个,这使我们得到5个猜测。

    So we can say, as the number of elements are getting doubled, the number of guesses required to find the target increments by 1.

    因此,可以说,随着元素数量增加一倍,找到target所需的猜测数量将增加1

    Seeing the pattern, right?

    看到图案了吧?

    Generalizing this, we can say, for an array with n elements,

    概括地说,对于具有n元素的数组,

    n, until we get the value 1, plus one.n开始可以重复减半的次数,直到获得值1加1。

    And guess what, in mathematics, the function log2 n means exactly same. We have already seen how the log function works above, did you notice something there?

    并猜想在数学上,函数log 2 n含义是完全相同的。 我们已经在上面看到了log函数的工作方式,您在那儿注意到了吗?

    For n = 8, the output of log2 n comes out to be 3, which means the array can be halved 3 times maximum, hence the number of steps(at most) to find the target value will be (3 + 1) = 4.

    对于n = 8 ,对log 2 n的输出为3 ,这意味着该数组可以减半为最大3倍,因此(最多)查找目标值的步骤数将为(3 +1)= 4。

    Question for you: What will be the maximum number of guesses required by Binary Search, to search a number in a list of 2,097,152 elements?

    您的问题:二进制搜索要搜索2097152个元素列表中的数字,最大猜想数是多少?

    翻译自: https://www.studytonight.com/data-structures/binary-search-algorithm

    二进制树型搜索算法

    展开全文
  • 二进制搜索算法Binary Search is the most popular Searching Algorithm which is most asked in coding interviews. Its popularity is because of it’s time complexity, where the linear search algorithm ...

    二进制搜索算法

    Binary Search is the most popular Searching Algorithm which is most asked in coding interviews. Its popularity is because of it’s time complexity, where the linear search algorithm takes O(N) time, the Binary Search takes O(log N) time. The only condition in Binary Search is that the array should be sorted.

    二进制搜索是最流行的搜索算法,在编码面试中要求最多。 它的流行是因为它具有时间复杂性,其中线性搜索算法需要O(N)时间,二进制搜索需要O(log N)时间。 Binary Search中的唯一条件是应对数组进行排序。

    In this article, I am going to solve a tricky problem of Binary Search asked in LeetCode called “Find the minimum element in a Rotated and Sorted array” or “Find the Pivot Element in the Rotated and Sorted array”

    在本文中,我将解决一个棘手的问题,即在LeetCode中提出的二进制搜索问题称为“在旋转和排序数组中查找最小元素”在旋转和排序数组中查找枢轴元素”

    This is a tricky problem because it cannot be solved by the standard Binary Search Algorithm since the array is rotated.

    这是一个棘手的问题,因为标准的二进制搜索算法无法解决此问题,因为该数组已旋转。

    问题陈述: (Problem Statement:)

    Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,  [0,1,2,4,5,6,7] might become  [4,5,6,7,0,1,2]).Find the minimum element.Input: [3,4,5,1,2] 
    Output: 1

    问题的方法: (Problem’s Approach:)

    The reason why Binary Search provides O(log N) time complexity is that on each iteration it eliminates half of the array and searches the element in the remaining half.

    二进制搜索提供O(log N)时间复杂度的原因是,每次迭代都会消除数组的一半,并在剩余的一半中搜索元素。

    We need to implement the same approach here and find a way to eliminate half of the array in each iteration.

    我们需要在此处实现相同的方法,并找到一种在每次迭代中消除一半数组的方法。

    问题的解决方案: (Problem’s Solution:)

    Let us look at this rotated array example carefully:

    让我们仔细看一下这个旋转数组的例子:

    Example: [4,5,6,7,0,1,2] // minimum element 0 at index 5

    By observing the array we can conclude two points:

    通过观察数组,我们可以得出两点结论:

    1. The index of the minimum element is the same as the number of rotations of the array

      最小元素的索引与数组的转数相同
    2. The minimum element is smaller than its adjacents

      最小元素小于其相邻元素

    But How do we eliminate one half of the array through Binary Search?

    但是,如何通过二进制搜索消除数组的一半呢?

    The approach is similar to the standard binary search where we find the middle element of the array but the condition changes. Hence by modifying the standard Binary Search Algorithm we get the solution.

    该方法类似于标准二进制搜索,在标准二进制搜索中,我们找到了数组的中间元素,但条件发生了变化。 因此,通过修改标准的二进制搜索算法,我们得到了解决方案。

    When we find the middle element ( in the above example number 7 is the middle element ) we can observe that the array is divided into two halves where one half is sorted and the other half is unsorted. Another interesting observation is that the minimum element is always in the unsorted half.

    当我们找到中间元素(在上面的示例中,数字7是中间元素)时,我们可以观察到数组被分为两半,其中一半被排序而另一半未被排序。 另一个有趣的发现是,最小元素始终位于未排序的一半中。

    Algorithm:

    算法:

    1. Find the middle element of the array.

      找到数组的中间元素。
    2. Check if the middle element is the minimum element

      检查中间元素是否为最小元素
    3. If the middle element does not satisfy the minimum element condition then apply binary search on the unsorted half of the array.

      如果中间元素不满足最小元素条件,则对数组的未排序部分应用二进制搜索。

    Code Implementation in Javascript:

    Java代码实现:

    Step 1: Set left and right values. In this problem, the left value is 0 and the right value is the length of the array.

    步骤1:设定左右数值。 在此问题中,左值为0,右值为数组的长度。

    let left = 0;
    let right = nums.length - 1;

    Step 2: Find the middle element of the array and check for the unsorted half of the array.

    步骤2:找到数组的中间元素,然后检查数组的未排序部分。

    const mid = Math.floor((left + right) / 2);if (arr[mid] > arr[right]) {
    left = mid + 1;
    } else {
    right = mid;
    }

    When the middle value is greater than the rightmost value of the array, it shows that the right half of the array is unsorted, or else the left side is unsorted.

    当中间值大于数组的最右值时,表明数组的右半部分未排序,否则左侧未排序。

    Step 3: Return the answer. The loop breaks when the left is greater than or equal to the right value. This happens when we have found the minimum element in the array as both left and right are equal we return the left index.

    步骤3:返回答案。 当left大于或等于right值时,循环中断。 当我们在数组中找到最小元素时(左和右相等),就会发生这种情况,因为我们返回左索引。

    return arr[left];

    最终解决方案: (Final Solution:)

    var findMinelement = function(arr) {
        let left = 0;
        let right = nums.length - 1;  
        while (left < right) {
            const mid = Math.floor((left + right) / 2);
            if (arr[mid] > arr[right]) {
              left = mid + 1;
            } else {
              right = mid;
            }
        }
    
    
        return arr[left];
    };

    Thank you for reading the article till the end, hope this article will help you in your coding preparations. All the best!!!

    感谢您阅读本文直到最后,希望本文对您的编码准备有所帮助。 祝一切顺利!!!

    翻译自: https://medium.com/nerd-for-tech/modified-binary-search-algorithm-to-solve-tricky-problems-92399b193206

    二进制搜索算法

    展开全文
  • c语言 二进制压缩算法by Pablo E.... 使用C ++解释的二进制搜索算法 (Binary Search Algorithms Explained using C++) Binary search is one of those algorithms that you’ll come across on every (good) introdu...

    c语言 二进制压缩算法

    by Pablo E. Cortez

    由Pablo E.Cortez

    使用C ++解释的二进制搜索算法 (Binary Search Algorithms Explained using C++)

    Binary search is one of those algorithms that you’ll come across on every (good) introductory computer science class. It’s an efficient algorithm for finding an item in an ordered list. For the sake of this example we’ll just assume this is an array.

    二进制搜索是您在每门(入门)计算机科学入门课程中都会遇到的算法之一。 这是一种用于在有序列表中查找商品的高效算法。 为了这个例子,我们只假设这是一个数组。

    The goals of binary search is to:

    二进制搜索的目标是:

    • be able to discard half of the array at every iteration

      每次迭代都能丢弃一半的数组
    • minimize the number of elements we have to go through

      最小化我们必须经历的元素数量
    • leave us with one final value

      给我们一个最终的价值

    Take for example the following array of integers:

    以下面的整数数组为例:

    int array[] = {     1, 3, 4, 6, 7, 8, 10, 13, 14, 18, 19, 21, 24, 37, 40, 45, 71 };

    Let’s say we are trying to find the index value of the number 7 in this array. There are 17 items in total and the index values go from 0 to 16.

    假设我们正在尝试查找此数组中数字7的索引值。 共有17个项目,索引值从0到16。

    We can see that the index value of 7 is 4, since it’s the fifth element in the array.

    我们可以看到索引值为7,因为它是数组中的第五个元素。

    But what would be the best way for the computer to find the index value of the number we are looking for?

    但是,计算机找到我们要查找的数字的索引值的最佳方法是什么?

    First, we store the min and max values, such as 0 and 16.

    首先,我们存储minmax ,例如016

    int min = 0;int max = 16;

    Now we have to come up with a guess. The smartest thing to do would be to guess an index value in the middle of the array.

    现在我们不得不猜测。 最明智的做法是猜测数组中间的索引值。

    With the index value 0 to 16 in this array, the middle index value of this array would be 8. That holds the number 14.

    在此数组的索引值为0到16的情况下,该数组的中间索引值为8。该数字为14。

    // This will round down if the quotient is not an integerint guess = (min + max) / 2;

    // This will round down if the quotient is not an integer int guess = (min + max) / 2;

    Our guess is now equal to 8, which is 14 in the array, since array[8] is equal to 14 .

    我们的猜测现在等于8,在数组中为14,因为array[8]等于14

    If the number we were looking for was 14, we would be done!

    如果我们要查找的数字是14,那么我们将完成!

    Since that is not the case, we will now discard half of the array. These are all the numbers after 14, or index value 8, since we know that 14 is greater than 7, and our guess is too high.

    既然不是这种情况,我们现在将丢弃数组的一半。 这些都是14或索引值8之后的所有数字,因为我们知道14大于7,我们的猜测太高了。

    After the first iteration, our search is now within: 1, 3, 4, 6, 7, 8, 10, 13

    第一次迭代后,我们现在的搜索范围是: 1, 3, 4, 6, 7, 8, 10, 13

    We don’t have to guess in the last half of the original array, because we know that all those values are too big. That’s why it’s important that we apply binary search to an ordered list.

    我们不必猜测原始数组的最后一半,因为我们知道所有这些值都太大。 这就是为什么将二进制搜索应用于有序列表很重要。

    Since our original guess of 14 was greater than 7, we now decrease it by 1 and store that into max:

    由于我们最初对14的猜测大于7,因此现在将其减少1,并将其存储到max

    max = guess - 1; // max is now equal to 7, which is 13 in the array

    Now the search looks like this:

    现在搜索如下所示:

    1, 3, 4, 6, 7, 8, 10, 13
    min = 0max = 7guess = 3

    Because our guess was too low, we discard the bottom half of the array by increasing the min, conversely to what we previously did to max:

    因为我们的猜测太低,所以我们通过增加min来丢弃数组的下半部分,这与之前对max所做的相反:

    min = guess + 1; // min is now 4

    By the next iteration, we are left with:

    在下一次迭代中,我们剩下:

    7, 8, 10, 13min = 4max = 7guess = 5

    Since index value 5 returns 8, we are now one over our target. We repeat the process again, and we are left with:

    由于索引值5返回8,因此我们现在比目标高1。 我们再次重复该过程,然后剩下:

    7min = 4max = 4guess = 4

    And we are left with only one value, 4, as the index of the target number we were looking for, which was 7.

    我们只剩下一个值4,即我们要寻找的目标编号的索引,即7。

    The purpose of binary search is to get rid of half of the array at every iteration. So we only work on those values on which it makes sense to keep guessing.

    二进制搜索的目的是在每次迭代时摆脱数组的一半。 因此,我们只处理那些值得继续猜测的值。

    The pseudo-code for this algorithm would look something like this:

    该算法的伪代码如下所示:

    1. Let min = 0 , and let max = n where n is the highest possible index value

      min = 0 ,令max = n ,其中n是可能的最高索引值

    2. Find the average of min and max , round down so it’s an integer. This is our guess

      找到minmax的平均值,将其四舍五入为整数。 这是我们的guess

    3. If we guessed the number, stop, we got it!

      如果我们猜到了数字,停下来,我们知道了!
    4. If guessis too low, set min equal to one more than guess

      如果guess值太低,则将min设置为比guess

    5. If guessis too high, set max equal to one less than guess

      如果guess值太高,则将max设置为比guess小1

    6. Go back to step two.

      回到第二步。

    Here’s a solution, written in C++:

    这是用C ++编写的解决方案:

    翻译自: https://www.freecodecamp.org/news/what-is-binary-search-algorithm-c-d4b554418ac4/

    c语言 二进制压缩算法

    展开全文
  • 求一个二进制搜索算法 Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has429496729...
  • Binary search also known as half-interval search, logarithmic search is an algorithm used in computers to find ... 二进制搜索也称为半间隔搜索 , 对数搜索是计算机中用于查找排序数组中值位置的算法。 Bub...
  • 二进制搜索算法by Divya Godayal 通过Divya Godayal 二进制搜索的一个扭曲故事 (A twisted tale of Binary Search) Awesome. That’s how I feel right now. Writing my first solo tech article. 太棒了 那就是我...
  • 二进制搜索算法by Julia Geist Julia·盖斯特(Julia Geist) 使用安全摄像机镜头解释二进制搜索算法 (Binary Search Algorithms explained using security camera footage) Binary search, also known as half-...
  • 在RFID系统中,为解决碰撞问题,必须采用一定的防碰撞算法,时分多址算法中的二进制搜索算法识别率较高,是RFID系统中最常用的防碰撞算法。介绍了常用防碰撞算法的原理,并详细分析了二进制搜索算法的原理和实现过程,最后...
  • 多个电子标签在识别时发生碰撞是射频识别(RFID)技术中的关键问题,通常使用的是二进制搜索算法,在其基础上提出的位传输二进制搜索算法是二进制算法的一种变异算法。文章在位传输二进制搜索算法的基础上进行改进,...
  • 二进制搜索算法结构模型对象二进制编组
  • <p>In <code>Binary Search Algorithm, <p>in general <pre><code>if mid_value > search_element we set high = mid_pos-1 ;...else mid_value < search_element we set low = mid_pos+1 ;...
  • 最常用的二进制搜索变体由Hermann Bottenbruch于1962年首次发布,此后一直没有发生明显变化。 下面,我将介绍几种性能有所提高的新颖变体。 最显着的变体是四进制二进制搜索,在32位整数上执行速度最高可提高25%。 ...
  • 最常用的二进制搜索变体由Hermann Bottenbruch于1962年首次发布,此后一直没有发生明显变化。下面,我将介绍几种具有改进性能的新颖变体。最显着的变体是单界二进制搜索,它对小于100万个32位整数的数组执行比标准...
  • 为了克服普通二进制算法交互次数多、通信数据量大的缺点,提出了一种改进二进制防碰撞算法。新算法首先进行信息预处理,识别过程中只处理冲突位,并以待识别标签为叶子节点反向构建识别树,在叶子节点的父层实现标签...
  • 搜索二进制 二进制搜索算法 这个Algotirimo是由一个朋友制作的: : 用于研究和测试的算法
  • 标签碰撞是射频识别 RFID 技术的常见问题,该问题影响...文中主要对基于二进制搜索算法做了详细的介绍,包括基本二进制搜索算法,动态二进制搜索算法和后退式动态二进制搜索算法,最后提出了一些算法改进的思路。
  • 用C语言编写一个二进制搜索算法,最近学习了C语言数组的知识</p>
  • 在本文中,我将比较线性搜索和二进制搜索算法。 您将看到每种算法的伪代码,以及示例和实现每种方法的逐步指南。 介绍 作为程序员,您想找到问题的最佳解决方案,以使您的代码不仅正确而且高效。 选择次优算法可能...
  • 动态二进制树搜索算法 二进制搜索树 (Binary Search Tree) A binary search tree is a useful data structure for fast addition and removal of data. 二进制搜索树是用于快速添加和删除数据的有用数据结构。 It...
  • 二进制树形搜索算法 二进制搜索用于在 值的排序列表 。 它选择排序值数组中的中间元素,并将其与目标值进行比较; 这就是我们在数组中寻找的关键。 如果它小于目标值,则在中间元素之后搜索,直到数组末尾。 如果...
  • 了一种新颖快速的二进制搜索防碰撞算法。该防碰撞算法不仅具有二进制树算法的优点,而且能通过查询循环来获取所有的标签 前缀,减少查询次数。分析和仿真结果表明,该防碰撞算法系统识别效率最高可达83.0%,远高于...
  • 针对基本蝙蝠算法收敛速度慢、易早熟的问题,提出了一种精英交叉二进制蝙蝠算法。该算法借鉴精英策略和遗传算法中的交叉机制,按照一定比例选择蝙蝠群中的精英个体进行交叉,将得到的子蝙蝠群和父蝙蝠群进行混合择优...
  • 该存储库包含Java的源代码,该源代码用于使用二进制搜索算法在数组中搜索整数的算法。 可以很容易地转换代码以在子集中查找特定项,现在,它在子集0到n(基本上是整个数组)中寻找该项。 如果数组未排序,则在使用...
  • 基于标签分组的RFID系统改进二进制搜索算法,田广东,周全,目前,无线射频识别(RFID)在仓库、供应链管理、零售、追踪和医疗保健等许多领域得到广泛应用。 然而,RFID技术中的碰撞问题严重影
  • 动态二进制搜索算法是在传统二进制算法的基础上进行改进的。 传统二进制算法,每次传输的数据是全部长度的序列号,造成了识读时间段浪费;因此动态的二进制搜索算法在每次传输中,阅读器传输一部分,标签传输一部分...
  • 流行的二进制搜索算法的迭代实现,用于在排序数组中查找元素。 (An Iterative implementation of the popular binary search algorithm to find an element in a sorted array.) Hello everyone! I have publ...
  • 从硬件电路设计和软件设计实现方面阐述了RFID定位系统设计的基本流程,并在CC2500的硬件功能基础之上,采用二进制搜索法有效地解决了多标签识别防碰撞的问题。通过接收标签的RSSI值,采用LANDMARC定位算法实现精确...
  • SearchRotatedArray 2021年3月21日,星期日

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 96,057
精华内容 38,422
关键字:

二进制搜索算法