摘要: Write a program that sorts a given sequence of characters in the ascending order. A sequence may include only the following characters: 'a', 'b', 'c', 阅读全文
posted @ 2020-08-15 15:42 longlong6296 阅读(95) 评论(0) 推荐(0)
摘要: Implement a method to sort a given array of ints using counting sort. The method should process numbers from -10 to 20 inclusive. Note: the method mus 阅读全文
posted @ 2020-08-15 14:06 longlong6296 阅读(142) 评论(0) 推荐(0)
摘要: Write a program that counts the number of required shifts to sort the numbers in the descending order using insertion sort. By shift, we mean the case 阅读全文
posted @ 2020-08-15 12:20 longlong6296 阅读(185) 评论(0) 推荐(0)
摘要: Let's say that an array is max-min sorted if the first element of the array is the maximum element, the second is the minimum, the third is the second 阅读全文
posted @ 2020-08-15 08:29 longlong6296 阅读(207) 评论(0) 推荐(0)
摘要: Count how many comparisons you need to do to determine the index of the element, or to determine that this element is not in the array. You need to us 阅读全文
posted @ 2020-08-14 17:31 longlong6296 阅读(183) 评论(0) 推荐(0)
摘要: If you have an array of size NN, how many comparisons do you need to perform to find each element of this array using jump search? You are given a num 阅读全文
posted @ 2020-08-14 13:35 longlong6296 阅读(190) 评论(0) 推荐(0)
摘要: The method described in the theory performs binary search for arrays sorted in ascending order. Your task here is to modify the method such that: it a 阅读全文
posted @ 2020-08-14 09:43 longlong6296 阅读(143) 评论(0) 推荐(0)
摘要: Implement a method to search the count of occurrence values from the first array in the second one. The method must return an array of counts with the 阅读全文
posted @ 2020-08-14 07:44 longlong6296 阅读(96) 评论(0) 推荐(0)
摘要: Implement a method to count the number of occurrences of a value in an array of int's. Sample Input 1: 19 14 17 15 17 17 Sample Output 1: 2 Sample Inp 阅读全文
posted @ 2020-08-14 07:29 longlong6296 阅读(94) 评论(0) 推荐(0)
摘要: Write a program that reads a year and the number of a month (1-12) and prints dates of all Mondays of this month in the correct order (from the first 阅读全文
posted @ 2020-08-13 12:45 longlong6296 阅读(128) 评论(0) 推荐(0)