- Type
- Quiz
- Course
- CS301 Data Structures
- Size
- PDF 626 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 64. Download the file for all 64 pages.
Cs301 LetureWise Question from 1 to 22
Lecture
What are the constraints ?
Constraint defines a limitation or restriction on resources of a system. In the computer, we have hard disk, memory and other hardware. We also have time to consider as a resource. Suppose you are writing an algorithm to solve a given problem and you have disc space of 400 Mega bytes. So, here you have space constraint that your algorithm should use only the available space in an efficient way. A solution is considered to be an efficient solution if it solves the problem within its resource constraints.
What is lvalue?
In an assignment statement, lvalue refers to some memory location where some value can be stored. Lvalue variable is written on left hand side of an assignment statement. For example, in the following statement, variable ‘var’ is lvalue variable and value 7 will be stored in it.
int var= 7;
What is “current” pointer ?
“Current” is a variable showing the status of currently focused element in array/list, for example if current = 5, it means that currently the focus is on element no. 5 in the array/list.
What is algorithem?
Algorithm is a finite sequence of steps for the solution of a problem.
WHAT IS ROLE OF ARRAYS IN DATA STRUCTURE?
Array is the most widely used data structure. It is also used as constituting integral part of other data structures. Array is mainly used to store similar data. For storing elements of indexed data, the particular method is array. For example, if you were storing information about each day in August, you would create an array with an index capable of addressing 31 values -- one for each day of the month. Think of a notebook with pages numbered 1 through 12. Each page may or may not contain information on it. The notebook is an array of pages. Each page is an element of the array 'notebook'. Arrays can also be multidimensional - instead of accessing an element of a one-dimensional list, elements are accessed by two or more indices, as from a matrix or tensor. Arrays guarantee constant time read and write access,O(1) , however many lookup operations (find_min, find_max, find_index) of an instance of an element are linear time, O(n). Arrays are very efficient in most languages, as operations compute the address of an element via a simple formula based on the base address element of the array.
HOW MANY TYPES AN DATA CAN BE ORGANIZE?
Data can be oranized in two main ways.
1- Linear as in arrays, lists
2-Non Linear or Hierarchical like Trees
What is important of data structure in our today's life?
Data structures importance/applications in Daily life :
In bank service rows of men follow the Queue data structure. In online shopping, selection and cancelation in the list of items is done/maintained via data structures. For representing a city region telephone network. Used to store a set of fixed key words which are referenced very frequently. DS are used to represent an image in the form of a bitmap. To implement back functionality in the internet browser. To implement printer spooler so that jobs can be printed in the order of their arrival. To record the sequence of all the pages browsed in one session. To implement the undo function in a text editor.
To store information about the directories and files in a system
What is chunk?
Chunk means "a piece of reasonable size". Computer memory is divide into small parts. Combination (allocation in sum) of these parts constitutes and can be called as chunk.
What is Basic purpose of data structure?
The main purpose of data structure is to organize and store the Data in Computer, in order to make the use of data efficient. Use of data efficiently means to use less space by the data and operations like searching, deletion, insertion etc on data took less time.
What are argc and argv ?
The variables argc and argv in the definition of main function, that is, main( int argc, char** argv) are called command line arguments,
What is the difference between the Data structure and Algorithms?
Data Structure is the organization of Data in computer in an efficient way, while Algorithm is a finite sequence of steps for the solution of a problem.
Example, Consider there are a number of students whose marks are needed to be store in the computer, now we can stored them in computer in an efficient way by using data structure like array, Linked List etc.. Consider we need to find the maximum marks obtained by a student in this list, now for this we need to use an algorithm (Sequence of steps), for example,
What is efficiency?
A solution is said to be efficient if it solves the problem within its resource constraints. Space
Time
The cost of a solution is the amount of resources that the solution consumes.
What is x?
X is a name of collection of items. Its individual items are numbered from zero to one less than array size. To access a cell, use the array name and an index as under:
x[0], x[1], x[2], x[3], x[4], x[5]
What is Array Name?
-‘x’ is an array name but there is no variable x. ‘X’ is not an ‘l’ value.
What are lists?
A list is collection of items that are all of the same type (grocery items, integers, names)
Related CS301 files
All CS301 files →- CS301 Official Handouts Official handout PDF 3.4 MB Free
- CS301 Midterm Notes Lectures 1-22 Midterm PDF 4.2 MB
- CS301 Assignment 3 Solution Fall 2022 by VUBuddy Assignment DOCX 68 KB
- CS301 Short Notes Quiz PDF 2.3 MB
- CS301 Solution 3 by Junaid Quiz PDF 814 KB
- CS301 Solved Quiz by Riz Mughal Quiz PDF 2.9 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.