Company Name Starts with ...
#  A  B  C  D  E   F  G  H  I  J   K  L  M  N  O   P  Q  R  S  T   U  V  W  X  Y  Z

Qatar University Interview Questions
Questions Answers Views Company eMail

What is the difference between authentication and authorization ?

7 41500

What is the time complexity T(n) of the following program? a) int n, d, i, j; cin >> n; for (d=1; d<=n; d++) for (i=1; i<=d; i++) for (j=1; j<=n; j += n/10) cout << d << " " << i << " " << j << endl; b) void main() { int n, s, t; cin >> n; for (s = 1; s <= n/4; s++) {t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } } c) void main() { int n, r, s, t; cin >> n; for (r = 2; r <= n; r = r * 2) for (s = 1; s <= n/4; s++) { t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } }

3 9005

Coin Problem You are given 9 gold coins that look identical. One is counterfeit and weighs a bit greater than the others, but the difference is very small that only a balance scale can tell it from the real one. You have a balance scale that costs 25 USD per weighing. Give an algorithm that finds the counterfeit coin with as little weighting as possible. Of primary importance is that your algorithm is correct; of secondary importance is that your algorithm truly uses the minimum number of weightings possible. HINT: THE BEST ALGORITHM USES ONLY 2 WEIGHINGS!!!

1 14808

Show by induction that 2n > n2, for all n > 4.

2 6436

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?

7336

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; } }

2619

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?.)

1 6443

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.)

1 13158

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).

1 6249

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.

10 43439

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

3186

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).

1 10661

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?

2 6059

Post New Qatar University Interview Questions




Un-Answered Questions

What is the database trigger?

217


What is subreport?

96


Explain 'bit masking'?

650


I want to know in brief - What is a Disiplineary Action Policy (DAP) and Carective Action Policy (CAP) the both terms used in call center ?

9283


What are the operations that could perform on the data in a Transformation Wizard?

3






1. A 380 / 220 V r.m.s. 3-phase 4-wire circuit carries loads of 8 + j8.1 ohm; 4 + j4.1 ohm; and 2 +j2.1 ohmin the three phases respectively. The length of the circuit is 100 m, and the resistivity of the phase conductors is 0.0005 Ω/m. The neutral conductor is of the same size as the phase conductors. a) Select a reference angle 0for the first phase. Then write down the three phase voltages in both polar format and complex number format. b) Make appropriate assumptions, and take temperature effects on resistance is insignificant. Calculate the currents in the three phases. (Note: Determine conductor resistance, and apply Kirchhoff’s Voltage Law) Based on the result, suggest a main switch rating for the circuit. c) Show your preferred direction of neutral current in a diagram, and then determine its value. (Note: Apply superposition principle, and Kirchhoff’s Current Law) Use its magnitude to show that in this circuit, the unbalanced load may increase the voltage drop in some of the phases. (Note: Also observe the common volt drip in neutral) State your assumptions, if there are any. d) Suddenly the neutral wire of the circuit is broken. Estimate the new currents in the first phase, i.e. Phase L1. State your assumptions, if there are any.

1481


What is the object studio in blue prism and how is it not the same as process studio?

132


What is the difference between big data and cloud computing?

335


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

716


What is autowiring in spring? What are the autowiring modes?

185


What is signed and unsigned?

640


Can I use hibernate without jpa?

160


What is the chromosome number of Ginkgoes?

1661


What difficulties and challenges do you foresee in making the move from managing a single plant to managing multiple plants? How will you overcome these difficulties and challenges?

2077


What are the 3 types of internal controls?

473