LeetCode Practice Data Structures — practice questions
Explore 22 free Data Structures questions in LeetCode Practice Computer Science. Each question opens with answer choices, the correct answer and a worked solution.
Practise Data Structures with Quill →Data Structures MCQs with answers
Showing questions 1–22 of 22.
Arranging a collection of elements into a particular order is called:Read the answer and worked solution →An algorithm repeatedly comparing neighbouring elements and swapping them is:Read the answer and worked solution →Exchanging the positions of two elements with each other is called:Read the answer and worked solution →For a list of n elements, bubble sort makes a total number of passes equal to:Read the answer and worked solution →To sort in ascending order, bubble sort places at the end of each pass the element that is:Read the answer and worked solution →The image of the biggest value rising through the list gives bubble sort its:Read the answer and worked solution →After each bubble sort pass, the sorted element is dropped from later passes, so the working list:Read the answer and worked solution →Selection sort divides the list into an unsorted right list and a left list that is:Read the answer and worked solution →At the start of selection sort, the left list contains a number of elements equal to:Read the answer and worked solution →In each selection sort pass, the smallest remaining element is swapped with the element that is:Read the answer and worked solution →For a list of n elements, selection sort makes a number of passes equal to:Read the answer and worked solution →Placing each element into its correct spot among those already sorted describes:Read the answer and worked solution →Insertion sort is compared to arranging a hand of playing:Read the answer and worked solution →The amount of time an algorithm takes to process given data is called its time:Read the answer and worked solution →With huge real-world data sets, comparing algorithms before choosing one becomes:Read the answer and worked solution →An algorithm with no loop at all has a time complexity of:Read the answer and worked solution →An algorithm with a single loop running from 1 to n has a time complexity of:Read the answer and worked solution →Algorithms whose running time grows in step with the input are called:Read the answer and worked solution →A loop placed inside another loop gives a time complexity of:Read the answer and worked solution →Algorithms whose running time follows that nested pattern are called:Read the answer and worked solution →When a program contains both a nested loop and a single loop, complexity is judged from the:Read the answer and worked solution →Bubble sort, selection sort and insertion sort all have a time complexity of:Read the answer and worked solution →
How to practise
- Choose a Data Structures question and try to work out your answer.
- Open the question to check the correct answer and read its worked solution.
- Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.