QuestionWrite a program of a Merge Sort algorithm implemented by the following pseudocode. You should also report the number of comparisons in the Merge function. ……继续阅读 » 站点默认 4年前 (2020-04-11) 4027浏览 34评论0个赞
QuestionWrite a program which reads an integer n and draws a Koch curve based on recursive calles of depth n.The Koch curve is well known as a kind of fractals.You can draw a Ko……继续阅读 » 站点默认 4年前 (2020-04-11) 7773浏览 0评论0个赞
QuestionWrite a program which reads a sequence A of n elements and an integer M, and outputs “yes” if you can make M by adding elements in A, otherwise “no”……继续阅读 » 站点默认 4年前 (2020-04-11) 3803浏览 36评论1个赞
QuestionSample Input 15 381739Sample Output 110Sample Input 24 21226Sample Output 26MeaningSolutionCodingSummary……继续阅读 » 站点默认 4年前 (2020-04-09) 9007浏览 7评论0个赞
QuestionYour task is to write a program of a simple dictionary which implements the following instructions:insert str: insert a string str in to the dictionaryfind str: if the d……继续阅读 » 站点默认 4年前 (2020-04-09) 2910浏览 2评论1个赞
QuestionYou are given a sequence of n integers S and a sequence of different q integers T. Write a program which outputs C, the number of integers in T which are also in the set S……继续阅读 » 站点默认 4年前 (2020-04-09) 4942浏览 54评论2个赞
QuestionYou are given a sequence of n integers S and a sequence of different q integers T. Write a program which outputs C, the number of integers in T which are also in the set S……继续阅读 » 站点默认 4年前 (2020-04-09) 5020浏览 31评论0个赞
QuestionAssume that rain is falling endlessly in the region and the water overflowing from the region is falling in the sea at the both sides. For example, for the above cross-s……继续阅读 » 站点默认 4年前 (2020-04-09) 2625浏览 25评论0个赞
QuestionStackCoding #include<iostream>#include<stack>#include<cstdio>#include<stdlib.h>using namespace std;stack&……继续阅读 » 站点默认 4年前 (2020-04-07) 2297浏览 18评论0个赞
QuestionYour task is to implement a double linked list.Write a program which performs the following operations:insert x: insert an element with key x into the front of the list.……继续阅读 » 站点默认 4年前 (2020-04-05) 5827浏览 44评论2个赞
QuestionTime Limit : 1 sec , Memory Limit : 131072 KB , isSolved :There are n processes in a queue. Each process has namei and timei. The round-robin scheduling handles the proce……继续阅读 » 站点默认 4年前 (2020-04-05) 1743浏览 8评论0个赞
QuestionReverse Polish notation is a notation where every operator follows all of its operands. For example, an expression (1+2)*(5+4) in the conventional Polish notation can be r……继续阅读 » 站点默认 4年前 (2020-04-04) 1364浏览 2评论0个赞
Question 1 insertionSort(A, n, g)2 for i = g to n-13 v = A[i]4 j = i - g5 while j >= 0 && A[j] &g……继续阅读 » 站点默认 4年前 (2020-04-04) 3715浏览 26评论0个赞