![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法分析与设计相关题目
Drscq
STRIVE FOR MY DREAM
展开
-
算法分析(time and storage complexity)
1.1 算法的时间复杂度分析 e.g. 1.4 This example is use do to illustrate the average, worst-case and best case cost for running an algorithm description of the example: find the element you want in an array using sequential selectin method.原创 2021-12-11 11:27:59 · 173 阅读 · 0 评论 -
find the element you want
The outputs: Input the length of array: 12 1 3 3 8 7 2 2 7 2 5 4 1 scan and identify whether 1 exists or not There is an element 1 in the array The corresponding codes: //step_1 generate a random array with random values // step_2 suppose原创 2021-12-11 11:26:22 · 486 阅读 · 0 评论 -
Material for Preparing Final Exam
Material for Preparing Final Exam Chapter_8 Dynamic Programming Material for Preparing Final Exam 求解袋鼠过河问题(p226) 求解数字和为sum的方法数问题p228 求解分饼干问题p232 求解堆砖块问题p234原创 2021-10-30 21:11:22 · 77 阅读 · 2 评论 -
Find a specific number in your link list
The length of the sequence: 7 The index: 0 The length of the sequence: 20 The index: 1 The corresponding codes: //find a specific number in a link sequence #include <iostream> #include <iomanip> #include <ctime> #include <cstdlib.原创 2021-12-01 22:47:25 · 584 阅读 · 0 评论 -
Generate a link list by recursive methods
The outputs: 2 8 5 1 10 the corresponding codes:\ #include <iostream> #include <iomanip> using namespace std; struct LNode{ int value; LNode *next; }; LNode *generate_Link(int n); void disp_Link(LNode *head); int main() {原创 2021-12-01 22:45:36 · 65 阅读 · 0 评论