- Отрасли: Technology
- Number of terms: 2742
- Number of blossaries: 0
- Company Profile:
The National Institute of Standards and Technology (NIST) — known between 1901 and 1988 as the National Bureau of Standards (NBS) — is a measurement standards laboratory and a non-regulatory agency of the United States Department of Commerce. The institute's official mission is to promote U.S. ...
Process all nodes of a tree by recursively processing all subtrees, then finally processing the root.
Industry:Computer science
Process all nodes of a tree by recursively processing the left subtree, then processing the root, and finally the right subtree.
Industry:Computer science
Put items in order by comparing the current item with the previous item. If they are in order, move to the next item (or stop if the end is reached). If they are out of order, swap them and move to the previous item. If there is no previous item, move to the next item.
Industry:Computer science
Randomly permute N elements by exchanging each element e<sub>i</sub> with a random element from i to N. It consumes Θ(N log N) bits and runs in linear time.
Industry:Computer science
Randomly select k items from a stream of items of unknown length. Save the first k items in an array of size k. For each item j, j > k, choose a random integer M from 1 to j (inclusive). If M ≤ k, replace item M of the array with item j.
Industry:Computer science
Read the M/2 first and last elements into a buffer (the buffer acts like the pivot in quicksort), and sort them. Read the next element from the beginning or end to balance writing. If the next element is less than the least of the buffer, write it to available space at the beginning. If greater than the greatest, write it to the end. Otherwise write the greatest or least of the buffer, and put the next element in the buffer. Keep the maximum lower and minimum upper keys written to avoid resorting middle elements that are in order. When done, write the buffer. Recursively sort the smaller partition, and loop to sort the remaining partition.
Industry:Computer science
Rearrange a heap to maintain the heap property, that is, the key of the root node is more extreme (greater or less) than or equal to the keys of its children. If the root node's key is not more extreme, swap it with the most extreme child key, then recursively heapify that child's subtree. The child subtrees must be heaps to start.
Industry:Computer science
Rearrange a string so repeated substrings lead to repeated characters in the rearranged string, which is easier to compress. Knowing which character was last in the original string, the original can be reconstructed from the rearranged string.
Industry:Computer science
Rearrange elements in an array into three groups: bottom, middle, and top.
Industry:Computer science