ログイン

Sorting algorithms
41問 • 1年前
  • iam noone
  • 通報

    問題一覧

  • 1

    is a basic building block that many other algorithms are built upon. It’s related to several exciting ideas that you’ll see throughout your programming career.

    Sorting

  • 2

    Understanding how sorting algorithms in Python work behind the scenes is a fundamental step toward implementing correct and efficient algorithms that solve real-world problems.

    true

  • 3

    Sorting is one of the most thoroughly studied algorithms in computer science. There are dozens of different sorting implementations and applications that you can use to make your code more efficient and effective

    true

  • 4

    for an item on a list works much faster if the list is sorted.

    searching

  • 5

    items from a list based on their relationship to the rest of the items is easier with sorted data. For example, finding the kth-largest or smallest value, or finding the median value of the list, is much easier when the values are in ascending or descending order

    selection

  • 6

    Finding values on a list can be done very quickly when the list is sorted.

    duplicates

  • 7

    Analyzing the frequency of items on a list is very fast if the list is sorted. For example, finding the element that appears most or least often is relatively straightforward with a sorted list.

    Distribution

  • 8

    The efficiency of any sorting algorithm is determined

    by the time complexity and space complexity of the algorithm.

  • 9

    refers to the time taken by an algorithm to complete its execution with respect to the size of the input. It can be represented in different forms:

    Time complexity

  • 10

    Big-O notation

    (O)

  • 11

    Omega notation

    (Ω)

  • 12

    Theta notation

    (Θ)

  • 13

    refers to the total amount of memory used by the algorithm for a complete execution. It includes both the auxiliary memory and the input.

    space complexity

  • 14

    is the additional space occupied by the algorithm apart from the input data. Usually, is considered for calculating the space complexity of an algorithm.

    auxiliary memory

  • 15

    is one of the most straightforward sorting algorithms.

    bubble sort

  • 16

    With every new pass, the largest element in the list “bubbles up” toward its correct position.

    true

  • 17

    consists of making multiple passes through a list, comparing elements one by one, and swapping adjacent items that are out of order.

    bubble sort

  • 18

    is a sorting algorithm that selects the smallest element from an unsorted list in each iteration and places that element at the beginning of the unsorted list.

    selection sort

  • 19

    straightforward to implement and understand. But unlike bubble sort, it builds the sorted list one element at a time by comparing each item with the rest of the list and inserting it into its correct position.

    insertion sort

  • 20

    An excellent analogy to explain insertion sort is the way you would sort a deck of cards. Imagine that you’re holding a group of cards in your hands, and you want to arrange them in order. You’d start by comparing a single card step by step with the rest of the cards until you find its correct position. At that point, you’d insert the card in the correct location and start over with a new card, repeating until all the cards in your hand were sorted.

    READDDDDDDD

  • 21

    is efficient for small data values is adaptive in nature, i.e. it is appropriate for data sets which are already partially sorted.

    Insertion Sort

  • 22

    This algorithm is one of the simplest algorithm with simple implementation

    insertion sort

  • 23

    It is a sorting algorithm that is an extended version of insertion sort and has improved the average time complexity of insertion sort. As similar to insertion sort, it is a comparison-based and in-place sorting algorithm. is efficient for medium-sized data sets.

    shell sort

  • 24

    is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays

    quick sort

  • 25

    is partitioned into two arrays one of which holds values smaller than the specified value, say pivot, based on which the partition is made and another array holds values greater than the pivot value.

    large array

  • 26

    This algorithm is quite efficient for large-sized data sets as its average and worst-case complexity are O(n2), respectively.

    quick sort

  • 27

    is one of the most popular sorting algorithms that is based on the principle of Divide and Conquer Algorithm.

    Merge sort

  • 28

    is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.

    merge sort

  • 29

    first divides the array into equal halves and then combines them in a sorted manner.

    merge sort

  • 30

    is a popular and efficient sorting algorithm in computer programming. requires knowledge of two types of data structures - arrays and trees.

    heap sort

  • 31

    works by visualizing the elements of the array as a special kind of complete binary tree called ______

    heap

  • 32

    The CONCEPT OF HEAP SORT is to eliminate the elements one by one from the heap part of the list, and then insert them into the sorted part of the list. Heap sort - is the in-place sorting algorithm.

    READ

  • 33

    tree in which all the levels except the last level, i.e., leaf node, should be completely filled, and all the nodes should be left-justified.

    Complete binary tree

  • 34

    is a sorting technique that is based on the keys between specific ranges. It performs sorting by counting objects having distinct key values like hashing. After that, it performs some arithmetic operations to calculate each object's index position in the output sequence.

    Counting sort

  • 35

    Counting sort - is not used as a general-purpose sorting algorithm.

    true

  • 36

    Counting sort - is effective when range is not greater than number of objects to be sorted. It can be used to sort the negative input values.

    READDD

  • 37

    - is the linear sorting algorithm that is used for integers.

    radix sort

  • 38

    ✓ In Radix sort, there is digit by digit sorting is performed that is started from the least significant digit to the most significant digit.

    READD

  • 39

    ✓ The process of radix sort works similar to the sorting of students names, according to the alphabetical order. In this case, there are 26 radix formed due to the 26 alphabets in English. In the first pass, the names of students are grouped according to the ascending order of the first letter of their names. After that, in the second pass, their names are grouped according to the ascending order of the second letter of their name. And the process continues until we find the sorted list

    READDDD

  • 40

    Complexity of Quick sort

    O(n2)

  • 41

    Time Complexity of merge sort is

    O(n log n)

  • Data Structure (history)

    Data Structure (history)

    iam noone · 64問 · 1年前

    Data Structure (history)

    Data Structure (history)

    64問 • 1年前
    iam noone

    Linear Data Structure

    Linear Data Structure

    iam noone · 43問 · 1年前

    Linear Data Structure

    Linear Data Structure

    43問 • 1年前
    iam noone

    Searching for Algorithms

    Searching for Algorithms

    iam noone · 22問 · 1年前

    Searching for Algorithms

    Searching for Algorithms

    22問 • 1年前
    iam noone

    Linked list/ Trees and graphs

    Linked list/ Trees and graphs

    iam noone · 51問 · 1年前

    Linked list/ Trees and graphs

    Linked list/ Trees and graphs

    51問 • 1年前
    iam noone

    INTRO TO MS ACCESS(database)

    INTRO TO MS ACCESS(database)

    iam noone · 19問 · 1年前

    INTRO TO MS ACCESS(database)

    INTRO TO MS ACCESS(database)

    19問 • 1年前
    iam noone

    Introduction To Java Programming Language

    Introduction To Java Programming Language

    iam noone · 80問 · 1年前

    Introduction To Java Programming Language

    Introduction To Java Programming Language

    80問 • 1年前
    iam noone

    Mod 2: Comp Prog

    Mod 2: Comp Prog

    iam noone · 55問 · 1年前

    Mod 2: Comp Prog

    Mod 2: Comp Prog

    55問 • 1年前
    iam noone

    COMP PROG MIDTERM

    COMP PROG MIDTERM

    iam noone · 42問 · 1年前

    COMP PROG MIDTERM

    COMP PROG MIDTERM

    42問 • 1年前
    iam noone

    FUNDAMENTALS OF DATABASE (Lesson 1)

    FUNDAMENTALS OF DATABASE (Lesson 1)

    iam noone · 31問 · 1年前

    FUNDAMENTALS OF DATABASE (Lesson 1)

    FUNDAMENTALS OF DATABASE (Lesson 1)

    31問 • 1年前
    iam noone

    FUNDAMENTALS OF DATABASE (part2)

    FUNDAMENTALS OF DATABASE (part2)

    iam noone · 33問 · 1年前

    FUNDAMENTALS OF DATABASE (part2)

    FUNDAMENTALS OF DATABASE (part2)

    33問 • 1年前
    iam noone

    DATABASE 2-5 MOD

    DATABASE 2-5 MOD

    iam noone · 25問 · 1年前

    DATABASE 2-5 MOD

    DATABASE 2-5 MOD

    25問 • 1年前
    iam noone

    DEPTALS (COMP PROG)

    DEPTALS (COMP PROG)

    iam noone · 49問 · 1年前

    DEPTALS (COMP PROG)

    DEPTALS (COMP PROG)

    49問 • 1年前
    iam noone

    HCI HISTORY

    HCI HISTORY

    iam noone · 18問 · 11ヶ月前

    HCI HISTORY

    HCI HISTORY

    18問 • 11ヶ月前
    iam noone

    Module 1 (System Analysis)

    Module 1 (System Analysis)

    iam noone · 18問 · 12ヶ月前

    Module 1 (System Analysis)

    Module 1 (System Analysis)

    18問 • 12ヶ月前
    iam noone

    Module 1 (Data Analytics)

    Module 1 (Data Analytics)

    iam noone · 35問 · 12ヶ月前

    Module 1 (Data Analytics)

    Module 1 (Data Analytics)

    35問 • 12ヶ月前
    iam noone

    Module 2(Data Analytics)

    Module 2(Data Analytics)

    iam noone · 35問 · 11ヶ月前

    Module 2(Data Analytics)

    Module 2(Data Analytics)

    35問 • 11ヶ月前
    iam noone

    Module 1 (Networking)

    Module 1 (Networking)

    iam noone · 25問 · 12ヶ月前

    Module 1 (Networking)

    Module 1 (Networking)

    25問 • 12ヶ月前
    iam noone

    Module 1 (Info Assurance)

    Module 1 (Info Assurance)

    iam noone · 22問 · 12ヶ月前

    Module 1 (Info Assurance)

    Module 1 (Info Assurance)

    22問 • 12ヶ月前
    iam noone

    mod 1 IT LIVING

    mod 1 IT LIVING

    iam noone · 61問 · 11ヶ月前

    mod 1 IT LIVING

    mod 1 IT LIVING

    61問 • 11ヶ月前
    iam noone

    問題一覧

  • 1

    is a basic building block that many other algorithms are built upon. It’s related to several exciting ideas that you’ll see throughout your programming career.

    Sorting

  • 2

    Understanding how sorting algorithms in Python work behind the scenes is a fundamental step toward implementing correct and efficient algorithms that solve real-world problems.

    true

  • 3

    Sorting is one of the most thoroughly studied algorithms in computer science. There are dozens of different sorting implementations and applications that you can use to make your code more efficient and effective

    true

  • 4

    for an item on a list works much faster if the list is sorted.

    searching

  • 5

    items from a list based on their relationship to the rest of the items is easier with sorted data. For example, finding the kth-largest or smallest value, or finding the median value of the list, is much easier when the values are in ascending or descending order

    selection

  • 6

    Finding values on a list can be done very quickly when the list is sorted.

    duplicates

  • 7

    Analyzing the frequency of items on a list is very fast if the list is sorted. For example, finding the element that appears most or least often is relatively straightforward with a sorted list.

    Distribution

  • 8

    The efficiency of any sorting algorithm is determined

    by the time complexity and space complexity of the algorithm.

  • 9

    refers to the time taken by an algorithm to complete its execution with respect to the size of the input. It can be represented in different forms:

    Time complexity

  • 10

    Big-O notation

    (O)

  • 11

    Omega notation

    (Ω)

  • 12

    Theta notation

    (Θ)

  • 13

    refers to the total amount of memory used by the algorithm for a complete execution. It includes both the auxiliary memory and the input.

    space complexity

  • 14

    is the additional space occupied by the algorithm apart from the input data. Usually, is considered for calculating the space complexity of an algorithm.

    auxiliary memory

  • 15

    is one of the most straightforward sorting algorithms.

    bubble sort

  • 16

    With every new pass, the largest element in the list “bubbles up” toward its correct position.

    true

  • 17

    consists of making multiple passes through a list, comparing elements one by one, and swapping adjacent items that are out of order.

    bubble sort

  • 18

    is a sorting algorithm that selects the smallest element from an unsorted list in each iteration and places that element at the beginning of the unsorted list.

    selection sort

  • 19

    straightforward to implement and understand. But unlike bubble sort, it builds the sorted list one element at a time by comparing each item with the rest of the list and inserting it into its correct position.

    insertion sort

  • 20

    An excellent analogy to explain insertion sort is the way you would sort a deck of cards. Imagine that you’re holding a group of cards in your hands, and you want to arrange them in order. You’d start by comparing a single card step by step with the rest of the cards until you find its correct position. At that point, you’d insert the card in the correct location and start over with a new card, repeating until all the cards in your hand were sorted.

    READDDDDDDD

  • 21

    is efficient for small data values is adaptive in nature, i.e. it is appropriate for data sets which are already partially sorted.

    Insertion Sort

  • 22

    This algorithm is one of the simplest algorithm with simple implementation

    insertion sort

  • 23

    It is a sorting algorithm that is an extended version of insertion sort and has improved the average time complexity of insertion sort. As similar to insertion sort, it is a comparison-based and in-place sorting algorithm. is efficient for medium-sized data sets.

    shell sort

  • 24

    is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays

    quick sort

  • 25

    is partitioned into two arrays one of which holds values smaller than the specified value, say pivot, based on which the partition is made and another array holds values greater than the pivot value.

    large array

  • 26

    This algorithm is quite efficient for large-sized data sets as its average and worst-case complexity are O(n2), respectively.

    quick sort

  • 27

    is one of the most popular sorting algorithms that is based on the principle of Divide and Conquer Algorithm.

    Merge sort

  • 28

    is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.

    merge sort

  • 29

    first divides the array into equal halves and then combines them in a sorted manner.

    merge sort

  • 30

    is a popular and efficient sorting algorithm in computer programming. requires knowledge of two types of data structures - arrays and trees.

    heap sort

  • 31

    works by visualizing the elements of the array as a special kind of complete binary tree called ______

    heap

  • 32

    The CONCEPT OF HEAP SORT is to eliminate the elements one by one from the heap part of the list, and then insert them into the sorted part of the list. Heap sort - is the in-place sorting algorithm.

    READ

  • 33

    tree in which all the levels except the last level, i.e., leaf node, should be completely filled, and all the nodes should be left-justified.

    Complete binary tree

  • 34

    is a sorting technique that is based on the keys between specific ranges. It performs sorting by counting objects having distinct key values like hashing. After that, it performs some arithmetic operations to calculate each object's index position in the output sequence.

    Counting sort

  • 35

    Counting sort - is not used as a general-purpose sorting algorithm.

    true

  • 36

    Counting sort - is effective when range is not greater than number of objects to be sorted. It can be used to sort the negative input values.

    READDD

  • 37

    - is the linear sorting algorithm that is used for integers.

    radix sort

  • 38

    ✓ In Radix sort, there is digit by digit sorting is performed that is started from the least significant digit to the most significant digit.

    READD

  • 39

    ✓ The process of radix sort works similar to the sorting of students names, according to the alphabetical order. In this case, there are 26 radix formed due to the 26 alphabets in English. In the first pass, the names of students are grouped according to the ascending order of the first letter of their names. After that, in the second pass, their names are grouped according to the ascending order of the second letter of their name. And the process continues until we find the sorted list

    READDDD

  • 40

    Complexity of Quick sort

    O(n2)

  • 41

    Time Complexity of merge sort is

    O(n log n)