PAT 1077. Kuchiguse (20) The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker’s personality. Such a preference is called “Kuchiguse” and is often exaggerated artistically in Anime and Manga. For example, the artificial sentence ending particle “nyan~” is often used as a stereotype
Continue reading PAT 1077. Kuchiguse (20)

1074. Reversing Linked List (25) 链表反转~最后一个测试点,小心特殊情况!

原题: Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K = 4, you must output 4→3→2→1→5→6. Input Specification: Each input file contains one test
Continue reading 1074. Reversing Linked List (25) 链表反转~最后一个测试点,小心特殊情况!

1078. Hashing (25) ::哈希表二次探测法|质数判定

原题 The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be “H(key) = key % TSize” where TSize is the maximum size of the hash table. Quadratic probing (with positive increments only)
Continue reading 1078. Hashing (25) ::哈希表二次探测法|质数判定