Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



Code Snippets Interview Questions
Questions Answers Views Company eMail

Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

ASD Lab, Qatar University, UNV,

7785

Complexity T(n) What is the time complexity T(n) of the following portions of code? For simplicity, you may assume that n is a power of 2. That is, n = 2k for some positive integer k. a) ? for (i = 1; i <= n; i++) { j = n; cout << i << ? ? j << ? ? << endl; } b) ? for (i = 0; i <= n; i += 2) { j = n; cout << i << ? ? j << ? ? << endl; } c) ? for (i = n; i >= 1; i = i/2) { j = n; cout << i << ? ? j << ? ? << endl; } d) for (i = 1; i <= n; i++) { j = n; while (j >= 0) { cout << i << ? ? j << ? ? << endl; j = j - 2; } }

Qatar University,

3049

Complexity T(n) Write a linear-time algorithm that sorts n distinct integers, each of which is between 1 and 500. Hint: Use a 500-element array. (Linear-time means your algorithm runs in time c*n + b, where c and b are any constants that do not depend on n. For example, your algorithm can run in time n, or time 2n + 1, or time 5n + 10, or time 100n + 6, but not time c*n*n = c*n?.)

Qatar University,

1 7192

Subsets Write an algorithm that prints out all the subsets of 3 elements of a set of n elements. The elements of the set are stored in a list that is the input to the algorithm. (Since it is a set, you may assume all elements in the list are distinct.)

CSC, Qatar University,

1 14068

Min-Max Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and calculate its complexity T(n).

Infosys, Qatar University,

1 7138

Min-Max Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and with complexity T(n) is at most about (1.5)n comparisons.

ABC, College School Exams Tests, ITC Infotech, Kyambogo University, Qatar University,

10 46320

Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

Qatar University,

3590

Faster Computers Suppose you have a computer that requires 1 minute to solve problem instances of size 1000. What instance sizes can be run in 1 minute if you buy a new computer that runs 1000 times faster than the old one, assuming the following time complexities T(n) for our algorithm? (a) T(n) = O(n). (b) T(n) = O(n3). (c) T(n) = O(10n).

Qatar University,

1 11575

Algorithm in O(2n) Presently we can solve in our hypothetical machine problem instances of size 100 in 1 minute using algorithm A, which is a O(2n). We would like to solve instances of size 200 in 1 minute using algorithm A on a new machine. What is the speed of the new machine should be?

ABC, Qatar University,

2 6912

Write a sql query to find n'th maximum in the database table.

Oracle,

3 10868

"c sharp" code for factorial using static variables

9 30107

how to use textfile for taking value for parametrization instead of datatable or global sheet

3 6220

How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...

Microsoft, MSD, Oracle,

6 15921

write the function. if all the character in string B appear in string A, return true, otherwise return false.

Google,

11 18790

Write a Program in Visual Basic by means of which we can send any data from Visual basic program to any other application running on that machine whether that application supports OLE or not.....

1 3845


Un-Answered Questions { Code Snippets }

Beautiful is for 012345678 9 and a code for similar word containing the same alphabets

6202


What is XML Element?

621


Code for Two Classes for Doing Gzip in Memory?

3225


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

2539


How can you print an address of a variable?

826


What is SAX in XML?

563


Coding for Synchronizing Cache Access in ASP.NET?

3590


Write a Program to find the number of words in a sentence.

849


code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc

2115


Can you write a program to find the average of numbers in a list in python?

796


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2682


How to encode and decode URL strings?

2248


i don't know about working of nested for loop can any one help me

2226


hai, i want to know how the connectionpool manager work in the java or netbeans.Anybody having the exact code plz give to me i have no idea about that so help me plz

2946


How to check if Folder is a Special Shell Folder ?

521