\ uFFFF is the character that is sorted last in the 16-bit "alphabet", that is, after any valid character of a letter, character, or special character.
When you do a binary search for a string in a sorted array, you will find a place where this string can be inserted. When you have several identical lines, you get a place in front of the first. When you add the "last letter of the alphabet" after your row, the insertion point will be after the last of the identical rows, so it gives you a series of identical rows in a sorted array.
Imagine: suppose you are not allowed to use the letter Z in your words. You now have a sorted array of strings:
0 1 2 3 4 5 6 aab abb abc abc abd bcx bdy
If you are looking for abc , binary search tells you the first place you can insert it, that is 2. If you are looking for abcZ , then you will get binary search 4, because abcZ comes in alphabetical order immediately after abc . This lets you know that the range between 2, inclusive and 4, exclusive, is occupied by the string abc . If both queries return the same number, you know that the string is not in the array.
In the paragraph that you indicated, \uFFFF plays the role of the "forbidden letter Z" in my example.
source share