Algorithm learning departure

Source: Internet
Author: User

A. given an ordered file containing up to 4 billion random 32-bit integers, find a 32-bit integer that is not in the file (at least one such number is missing in the folder-Why ?). How can we solve this problem if it is sufficiently internal? If there are several external "temporary" files available, but only a few hundred bytes of memory, how can this problem be solved?

 

B. Rotate an N-element vector to the left I position. For example, when n = 8 and I = 3, the vector abcdefgh is rotated to defghabc. Simple code uses AN INTERMEDIATE VECTOR OF N element to complete the work in n steps. Can you use only dozens of extra bytes of storage space to complete vector rotation in a proportional time of n.

 

C. Give an English dictionary to find a set of all the modified words. For example, "pots", "stop", and "tops" are different words, because each word can be obtained by changing the order of letters in other words.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.