KING'S IT WORLD
please register to watch content in detail
THANKS
ADMIN KINGSIT WORLD

KING'S IT WORLD


 
HomeHome  CalendarCalendar  GalleryGallery  FAQFAQ  SearchSearch  UsergroupsUsergroups  RegisterRegister  Log inLog in  
Search
 
 

Display results as :
 
Rechercher Advanced Search
kings it world text ad
KINGSITWORLD CALENDAR
Follow me on G+
KINGSITWORLD WEATHER
Latest topics
» QURAN MAJEED KE TAFSEER
Mon Aug 20, 2012 2:59 am by YOUSUFHALI

» PHY301 CIRCUIT THEORY REFERENCE BOOK
Wed Jul 25, 2012 11:36 am by shabbir1915

» MTH202 ASSIGNMENT NO 3 SOLUVED
Mon Jun 11, 2012 9:51 am by jaffarhussain

» Retrieve the DTC In the Jewel Module of 1995 Ford
Thu May 31, 2012 11:51 am by obd2tool

» How you can Obvious the Check Engine Light on the
Thu May 31, 2012 11:43 am by obd2tool

» send free sms and send free sms update on facebook
Tue May 15, 2012 8:33 pm by rizwan269

» United Bank Limited (UBL) - Fee Deposit
Thu May 10, 2012 3:33 pm by irumnaz

» PHOTO MIXER SOFTWARE
Fri Apr 20, 2012 10:02 am by sacredwkb

» Entrepreneurship Survey
Thu Mar 08, 2012 2:20 pm by Admin

» Fall 2011 Semester Result Announced
Thu Mar 08, 2012 2:19 pm by Admin

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
kings it world text ad
Social bookmarking
Social bookmarking Digg  Social bookmarking Delicious  Social bookmarking Reddit  Social bookmarking Stumbleupon  Social bookmarking Slashdot  Social bookmarking Yahoo  Social bookmarking Google  Social bookmarking Blinklist  Social bookmarking Blogmarks  Social bookmarking Technorati  

Bookmark and share the address of KING'S IT WORLD on your social bookmarking website
visitors counter
Powered by website analytics technology.
Keywords
cs403 MTH202 MTH101 STA301 2011 solved cs101 MCM301 mgt502 final mth301 2010 midterm assignment quiz term papers quran SPRING cs401 cs605 CS302 MKT621 mth302 FALL paper
kings it world text ad
FLAG COUNTER
free counters
LIVE TRAFFIC

Share | 
 

 CS301 FINALTERM PAPER 2010

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin
avatar

Scorpio
Posts : 638
Points : 2155
Reputation : 19
Join date : 2010-05-15
Age : 29
Location : islamabad

PostSubject: CS301 FINALTERM PAPER 2010   Sun Aug 08, 2010 10:36 pm

Question No: 1 ( Marks: 1 ) - Please choose one


A solution is said to be efficient if it solves the problem within its resource constraints i.e. hardware and time.


► True

► False



Question No: 2 ( Marks: 1 ) - Please choose one


Which one of the following is known as "Last-In, First-Out" or LIFO Data Structure?


► Linked List

► Stack

► Queue

► Tree



Question No: 3 ( Marks: 1 ) - Please choose one


What will be postfix expression of the following infix expression?
Infix Expression : a+b*c-d


► ab+c*d-

► abc*+d-

► abc+*d-

► abcd+*-



Question No: 4 ( Marks: 1 ) - Please choose one


For compiler a postfix expression is easier to evaluate than infix expression?


► True

► False



Question No: 5 ( Marks: 1 ) - Please choose one


Consider the following pseudo code
declare a stack of characters
while ( there are more characters in the word to read )
{
read a character
push the character on the stack
}
while ( the stack is not empty )
{
pop a character off the stack
write the character to the screen
}
What is written to the screen for the input "apples"?


► selpa

► selppa

► apples

► aaappppplleess



Question No: 6 ( Marks: 1 ) - Please choose one


Consider the following function:

void test_a(int n)
{
cout << n << " ";
if (n>0)
test_a(n-2);
}

What is printed by the call test_a(4)?


► 4 2

► 0 2 4

► 0 2


► 2 4




Question No: 7 ( Marks: 1 ) - Please choose one


If there are N external nodes in a binary tree then what will be the no. of internal nodes in this binary tree?


► N -1

► N+1

► N+2

► N



Question No: 8 ( Marks: 1 ) - Please choose one


If there are N internal nodes in a binary tree then what will be the no. of external nodes in this binary tree?


► N -1

► N

► N +1

► N +2



Question No: 9 ( Marks: 1 ) - Please choose one


If we have 1000 sets each containing a single different person. Which of the following relation will be true on each set:

► Reflexive

► Symmetric

► Transitive

► Associative



Question No: 10 ( Marks: 1 ) - Please choose one


Which one of the following is NOT the property of equivalence relation:

► Reflexive

► Symmetric

► Transitive

► Associative



Question No: 11 ( Marks: 1 ) - Please choose one


A binary tree of N nodes has _______.


► Log10 N levels

► Log2 N levels

► N / 2 levels

► N x 2 levels



Question No: 12 ( Marks: 1 ) - Please choose one


The easiest case of deleting a node from BST is the case in which the node to be deleted ___________.


► Is a leaf node

► Has left subtree only

► Has right subtree only

► Has both left and right subtree



Question No: 13 ( Marks: 1 ) - Please choose one


If there are N elements in an array then the number of maximum steps needed to find an element using Binary Search is _______ .

► N

► N2

► Nlog2N

► log2N



Question No: 14 ( Marks: 1 ) - Please choose one


Merge sort and quick sort both fall into the same category of sorting algorithms. What is this category?


► O(nlogn) sorts

► Interchange sort

► Average time is quadratic

► None of the given options.



Question No: 15 ( Marks: 1 ) - Please choose one


If one pointer of the node in a binary tree is NULL then it will be a/an _______ .


► External node

► Root node

► Inner node

► Leaf node



Question No: 16 ( Marks: 1 ) - Please choose one


We convert the ________ pointers of binary to threads in threaded binary tree.


► Left

► Right

► NULL

► None of the given options



Question No: 17 ( Marks: 1 ) - Please choose one


If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a


► Expression tree

► Threaded binary tree

► complete Binary tree

► Perfectly complete Binary tree



Question No: 18 ( Marks: 1 ) - Please choose one


What is the best definition of a collision in a hash table?


► Two entries are identical except for their keys.


► Two entries with different data have the exact same key

► Two entries with different keys have the same exact hash value.


► Two entries with the exact same key have different hash values.



Question No: 19 ( Marks: 1 ) - Please choose one


Suppose that a selection sort of 100 items has completed 42 iterations of the main loop. How many items are now guaranteed to be in their final spot (never to be moved again)?


► 21

► 41

► 42

► 43



Question No: 20 ( Marks: 1 ) - Please choose one


Suppose you implement a Min heap (with the smallest element on top) in an array. Consider the different arrays below; determine the one that cannot possibly be a heap:

► 16, 18, 20, 22, 24, 28, 30

► 16, 20, 18, 24, 22, 30, 28

► 16, 24, 18, 28, 30, 20, 22

► 16, 24, 20, 30, 28, 18, 22



Question No: 21 ( Marks: 1 ) - Please choose one


Do you see any problem in the code of nextInOrder below:

TreeNode * nextInorder(TreeNode * p)
{
if(p->RTH == thread)
return( p->R );
else {
p = p->R;
while(p->LTH == child)
p = p->R;
return p;
}
}



► The function has no problem and will fulfill the purpose successfully.

► The function cannot be compile as it has syntax error.

► The function has logical problem, therefore, it will not work properly.

► The function will be compiled but will throw runtime exception immediately after the control is transferred to this function.



Question No: 22 ( Marks: 1 ) - Please choose one


Which of the following statement is correct about find(x) operation:


► A find(x) on element x is performed by returning exactly the same node that is found.

► A find(x) on element x is performed by returning the root of the tree containing x.

► A find(x) on element x is performed by returning the whole tree itself containing x.

► A find(x) on element x is performed by returning TRUE.



Question No: 23 ( Marks: 1 ) - Please choose one


Which of the following statement is NOT correct about find operation:


► It is not a requirement that a find operation returns any specific name, just that finds on two elements return the same answer if and only if they are in the same set.

► One idea might be to use a tree to represent each set, since each element in a tree has the same root, thus the root can be used to name the set.


► Initially each set contains one element.

► Initially each set contains one element and it does not make sense to make a tree of one node only.



Question No: 24 ( Marks: 1 ) - Please choose one


In complete binary tree the bottom level is filled from ________

► Left to right

► Right to left

► Not filled at all

► None of the given options



Question No: 25 ( Marks: 1 ) - Please choose one


Here is an array of ten integers:
5 3 8 9 1 7 0 2 6 4
The array after the FIRST iteration of the large loop in a selection sort (sorting from smallest to largest).


► 0 3 8 9 1 7 5 2 6 4

► 2 6 4 0 3 8 9 1 7 5

► 2 6 4 9 1 7 0 3 8 5

► 0 3 8 2 6 4 9 1 7 5



Question No: 26 ( Marks: 1 ) - Please choose one


What requirement is placed on an array, so that binary search may be used to locate an entry?


► The array elements must form a heap.

► The array must have at least 2 entries.

► The array must be sorted.

► The array’s size must be a power of two.



Question No: 27 ( Marks: 2 )


Give one example of Hashing



Question No: 28 ( Marks: 2 )


How heap sort works to sort a set of data.



Question No: 29 ( Marks: 2 )


How we can implement Table ADT using Linked List



Question No: 30 ( Marks: 2 )


If we allow assignment to constants what will happen?



Question No: 31 ( Marks: 3 )


Explain the process of Deletion in a Min-Heap



Question No: 32 ( Marks: 3 )


Give any three characteristics of Union by Weight method.



Question No: 33 ( Marks: 3 )


"For smaller lists, linear insertion sort performs well, but for larger lists, quick sort is suitable to apply." Justify why?


Question No: 34 ( Marks: 5 )


Write down the C++ code to implement Insertion Sort Algorithm.



Question No: 35 ( Marks: 5 )


Consider the following Threaded Binary Tree,

You have to give the values that should be in the four variables given below, for the node 37

1. LTH (Left flag)
2. RTH (Right flag)
3. Left node pointer (->L)
4. Right node pointer (->R)



Question No: 36 ( Marks: 5 )


What is Disjoint Sets? Explain with an example.




Back to top Go down
View user profile
 
CS301 FINALTERM PAPER 2010
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Court upholds ruling on LTO security paper bidding
» Mercredi 10 mars 2010 : l'horoscope
» Noah Paper Mills Wins Bid to Supply Paper for Barangay and Sangguniang Kabataan (SK) Polls
» OTC Paper Supply and Smartmatic bag COMELEC contracts
» Is The Iraqi Dinar Worthless Paper Or Maker Of Millionaires?

Permissions in this forum:You cannot reply to topics in this forum
KING'S IT WORLD :: EDUCATION :: PAPERS :: SPRING 2010 FINAL TERM PAPERS (updated daily)-
Jump to: