尔雅数据结构与数据库技术章节答案(学习通2023题目答案)

智慧树问答2024-05-19 05:35:5811272抢沙发
尔雅数据结构与数据库技术章节答案(学习通2023题目答案)摘要: Efficient algorithmsLogarithms1、Recall that is the power to which you need to raise aa in order to ...

尔雅数据结构与数据库技术章节答案(学习通2023题目答案)

Efficient algorithms

Logarithms

1、尔雅Recall that is 数据数据术章the power to which you need to raise aa in order to obtain nn. The main rules for working with logarithms are the following: Is it true that

2、

3、结构节答

4、库技

5、案学

6、习通

Big-O

1、题目Recall that we write to express the fact that f(n) grows no faster than g(n): there exist constants N and c > 0 so that for all . N Is it true that ?答案

2、

3、尔雅

4、数据数据术章

5、结构节答

6、库技

7、案学

Basic Data Structures

Basic Data Structures

1、习通Which of the basic data structures is 题目the most suitable if you need to access its elements by their positions in O(1) time (this is called random access)?
A、Queue
B、Stack
C、Array
D、List

2、第 2 个问题 Which of the basic data structures is the most suitable if you want to be able to insert elements in the middle in O(1) time?
A、Queue
B、Stack
C、Array
D、List

3、Which of the basic data structures is the most suitable if you only need to insert the elements in the back and to extract elements from the front?
A、Stack
B、Queue
C、Array
D、List

4、Which of the basic data structures is the most suitable if you only need to implement recursion in a programming language? When you make a recursive call, you need to save the function you are currently in and its parameters values in some data structure, so that when you go out of the recursion you can restore the state. When you go out of the recursive call, you will always need to extract the last element that was put in the data structure.
A、Tree
B、Queue
C、Stack
D、Array

5、Which of the basic data structures is the most suitable if you need to store the directory structure on your hard drive?
A、Queue
B、List
C、Stack
D、Tree

Programming Assignment 1

1、1 Check brackets in the code Problem Introduction In this problem you will implement a feature for a text editor to find errors in the usage of brackets in the code. Problem Description as Attachment.

Divide and Conquer

Greedy Algorithms

1、第 2 个问题 In the previous problem, what is the subproblem you need to solve after you've made a safe move?
A、Choose projects with highest payment to work on from the pool of projects which now contains only 9 projects.
B、Determine the order in which to work on the selected projects.
C、Compute the sum of payoffs you will get when you complete the selected projects.
D、None of above.

2、第 1 个问题 You work as a freelancer and have a pool of 10 projects to work on. For each project you know how much money you will get for completing the project. You can complete any 3 projects this month. You want to select such projects that you will get the most money by completing them. What are the safe moves in this problem? (Mark all that apply.)
A、Take the project with the highest payment for completion, complete it and remove it from the pool of projects.
B、Take the project for which you can apply the cool new technology that you've recently learned about.
C、Take the project which you like the most.
D、If there are more than 3 projects in the pool, remove the project with the lowest payment for completion, don't work on this project. In the other case, remove the first project from the pool and work on this project.

3、第 3 个问题 You need to find an integer with the largest product of digits. You use a greedy strategy: first, determine the largest possible first digit (tens) of xx, then determine the largest possible second digit (ones) of xx (among all the numbers in the range from 23 to 73 whose first digit is equal to the digit selected at the first step). Will this greedy strategy work correctly?

Sorting Problems

1、What is the running time of selecting the minimum element on each iteration of the selection sort?
A、
B、
C、
D、

2、How many operations are needed to merge two sorted arrays of sizes mm and n respectively?
A、
B、
C、
D、

3、Can we use the merging procedure from the lectures to merge the arrays [1, 3, 2, 5, 4] and [5, 6, 7, 8, 9] in order to receive a sorted array?

4、Can you use Count Sort to sort an array of positive real numbers which are less than 100, such as [0.572, 0.25, 2.34, 3.14159, 2.781828, 42], in O(n) time?

Priority Queues

Priority Queues: Heap Sort随堂测验

1、Assume that a max-heap with 10^5 elements is stored in a complete 5-ary tree. Approximately how many comparisons a call to { tt Insert()}Insert () will make?
A、8
B、18
C、28
D、38

2、第 5 个问题 Assume that a max-heap with elements is stored in a complete 7-ary tree. Approximately how many comparisons a call to { tt ExtractMax()}ExtractMax() will make?
A、5
B、50
C、500
D、5000

3、第 6 个问题 Assume that we represent a complete dd-ary tree in an array A[1\dots n]A[1,2,...,n] (this is a 1-based array of size nn). What is the right formula for the indices of children of a node number ii ?
A、
B、
C、
D、

4、 How many edges of this binary tree violate the min-heap property? In other words, for how many edges of the tree, the parent value is greater than the value of the child?

5、 This binary tree contains 13 nodes, and hence we have 13 subtrees here (rooted at each of 13 nodes). How many of the subtrees are complete?

6、Consider a complete binary tree represented by an array [19,14,28,15,16,7,27,15,21,21,5,2][19,14,28,15,16,7,27,15,21,21,5,2]. How many edges of this tree violate the max-heap property? In other words, for how many edges of the tree, the parent value is smaller than the value of the child?

Hash Tables

Hash Tables and Hash Functions

1、What is the size of the array needed to store integer keys with up to 1212 digits using direct addressing?
A、12
B、
C、
D、

2、What is the maximum possible chain length for a hash function h(x) = x \bmod{ 1000}h(x) = x mod 1000 used with a hash table of size 10001000 for a universe of all integers with at most 12 digits?
A、1
B、1000
C、
D、

3、You want to hash integers from 00 up to 10000001000000. What can be a good choice of pp for the universal family?
A、999997
B、1000002
C、1000003
D、1000005

4、How can one build a universal family of hash functions for integers between -1000000-1000000 (minus one million) and 10000001000000 (one million)?
A、First, add 10000001000000 to each integer and get the range of integers between 00 and 2000000. Then use the universal family for integers with p = 2000003p=2000003.
B、Take the universal family for integers with p = 1000003.p = 1000003
C、First, add 10000001000000 to each integer. Then use the universal family for integers with p = 1000003.p = 1000003 p.
D、none of above.

学习通数据结构与数据库技术

数据结构和数据库技术是计算机科学中非常重要的两个方面。学习通数据结构与数据库技术课程是一门面向计算机专业学生的基础课程,它主要介绍了数据结构和数据库技术的相关知识,包括线性表、树、图、排序算法、关系型数据库、NoSQL数据库等内容。

数据结构

数据结构是计算机科学中研究数据的组织、存储和管理的一门学科。常用的数据结构包括线性表、树、图等。掌握数据结构的知识对于计算机专业学生来说至关重要。

线性表

线性表是一种数据结构,它是由n个数据元素按照线性的方式组成的有限序列。常见的线性表包括数组、链表、栈、队列等。学习线性表的基本操作和算法可以提高编程的效率。

树是一种数据结构,它是由n个节点组成的集合。每个节点都有零个或多个子节点。学习树的相关知识可以帮助学生更好地理解树结构在编程中的应用,如二叉树、堆等。

图是一种数据结构,它是由顶点和边组成的集合。学习图的相关算法可以帮助学生更好地理解图结构在编程中的应用,如最短路径算法、最小生成树算法等。

排序算法

排序算法是计算机科学中很常用的算法。学习通数据结构与数据库技术课程中介绍了常见的排序算法,如冒泡排序、快速排序、插入排序等。熟练掌握排序算法可以提高编程的效率。

数据库技术

数据库技术是计算机科学中研究数据库的设计、开发和管理等方面的学科。掌握数据库技术的基本知识对于计算机专业学生来说非常重要。

关系型数据库

关系型数据库是目前应用最广泛的数据库类型之一。它使用关系模型来描述数据之间的关系。学习通数据结构与数据库技术课程中介绍了关系型数据库的基本概念、SQL语言的基本操作、数据库设计等内容。

NoSQL数据库

NoSQL数据库是一种非关系型数据库,它不使用SQL语言,而是使用其他查询语言。学习通数据结构与数据库技术课程中介绍了NoSQL数据库的基本概念、MongoDB数据库、Redis数据库等内容。

总结

学习通数据结构与数据库技术课程是一门重要的计算机专业课程,它介绍了数据结构和数据库技术的相关知识。通过学习这门课程,学生可以熟练掌握数据结构和数据库技术的基本知识,提高编程的效率。

学习通数据结构与数据库技术

数据结构和数据库技术是计算机科学中非常重要的两个方面。学习通数据结构与数据库技术课程是一门面向计算机专业学生的基础课程,它主要介绍了数据结构和数据库技术的相关知识,包括线性表、树、图、排序算法、关系型数据库、NoSQL数据库等内容。

数据结构

数据结构是计算机科学中研究数据的组织、存储和管理的一门学科。常用的数据结构包括线性表、树、图等。掌握数据结构的知识对于计算机专业学生来说至关重要。

线性表

线性表是一种数据结构,它是由n个数据元素按照线性的方式组成的有限序列。常见的线性表包括数组、链表、栈、队列等。学习线性表的基本操作和算法可以提高编程的效率。

树是一种数据结构,它是由n个节点组成的集合。每个节点都有零个或多个子节点。学习树的相关知识可以帮助学生更好地理解树结构在编程中的应用,如二叉树、堆等。

图是一种数据结构,它是由顶点和边组成的集合。学习图的相关算法可以帮助学生更好地理解图结构在编程中的应用,如最短路径算法、最小生成树算法等。

排序算法

排序算法是计算机科学中很常用的算法。学习通数据结构与数据库技术课程中介绍了常见的排序算法,如冒泡排序、快速排序、插入排序等。熟练掌握排序算法可以提高编程的效率。

数据库技术

数据库技术是计算机科学中研究数据库的设计、开发和管理等方面的学科。掌握数据库技术的基本知识对于计算机专业学生来说非常重要。

关系型数据库

关系型数据库是目前应用最广泛的数据库类型之一。它使用关系模型来描述数据之间的关系。学习通数据结构与数据库技术课程中介绍了关系型数据库的基本概念、SQL语言的基本操作、数据库设计等内容。

NoSQL数据库

NoSQL数据库是一种非关系型数据库,它不使用SQL语言,而是使用其他查询语言。学习通数据结构与数据库技术课程中介绍了NoSQL数据库的基本概念、MongoDB数据库、Redis数据库等内容。

总结

学习通数据结构与数据库技术课程是一门重要的计算机专业课程,它介绍了数据结构和数据库技术的相关知识。通过学习这门课程,学生可以熟练掌握数据结构和数据库技术的基本知识,提高编程的效率。

文章版权及转载声明

本文地址:http://www.zzxhsh.org/08f799494.html发布于 2024-05-19 05:35:58
文章转载或复制请以超链接形式并注明出处五煦查题

评论列表 (暂无评论,44人围观)参与讨论