Showing 2401–2420 of 4795

Q2401.What is the space complexity of the HeapSort algorithm?

Easy
A O(1)
B O(2)
C O(3)
D None of these
Computer Terminology PPSC

Correct Answer: A

Heap Sort is an in-place sorting algorithm, requiring constant auxiliary space, O(1).

Q2402.The characteristics of a suitable set of normalized relations include all of these EXCEPT?

Easy
A The minimal number of attributes necessary to support the data requirements of the enterprise.
B Attributes with a close logical relationship are found in the same relation.
C Implementation of a method that depends on the type of the object it is applied to (overriding).
D Minimal redundancy with each attribute represented only once (except for foreign keys).
General MCQs PPSC

Correct Answer: C

Normalization is a relational database concept. Method overriding is an object-oriented programming concept, not related to database normalization.

Q2403.What is the space complexity of the Quicksort algorithm?

Easy
A O(log n)
B O^2(log n)
C O(log n^2)
D None of these
Computer Terminology PPSC

Correct Answer: A

Quick Sort has an average auxiliary space complexity of O(log n) due to the call stack of its recursive partitioning.

Q2404.In Tuple Relational Calculus, to express the query "Find the set of all tuples S such that F(S) is true", how can we write this?

Easy
A {S = F(S)}
B {S < F(S)}
C {S | F(S)}
D None of these
Computer Terminology PPSC

Correct Answer: C

Tuple Relational Calculus uses the set notation {S | F(S)} to represent all tuples S that satisfy the predicate formula F(S).

Q2405.Which of the following is the Best Case Time Complexity of the Bubble Sort algorithm?

Easy
A O(n)
B O(n^2)
C O^2(n^2)
D None of these
Computer Terminology PPSC

Correct Answer: A

An optimized Bubble Sort (using a flag to detect if any swaps occurred) has a best-case time complexity of O(n) when the input array is already sorted.

Q2406.Which of the underlying network is a network with a size between a LAN and a WAN, normally covering a town or city?

Easy
A PAN (Personal Area Network)
B SAN (Storage Area Network)
C MAN (Metropolitan Area Networks)
D None of these
Computer Networks PPSC

Correct Answer: C

A MAN (Metropolitan Area Network) covers a geographical area larger than a LAN but smaller than a WAN, typically spanning a city.

Q2407.A DFA (deterministic finite automata) is defined by a quintuple (5-tuple) as (Q, Σ, δ, q0, F). Where δ = ______?

Easy
A Finite set of input symbols
B Finite set of states
C A transition function that maps Q x Σ --> Q
D None of these
MS PowerPoint PPSC

Correct Answer: C

In DFA, δ (delta) is the transition function mapping Q x Σ -> Q, defining the state transition based on input.

Q2408.What are the advantages of compiled languages?

Easy
A It is easy to write the source code
B It is faster to declare variables
C Their execution speed is faster
D Both A and B
Computer Terminology PPSC

Correct Answer: C

Compiled languages are translated to machine code before execution, making their execution speed significantly faster than interpreted languages.

Q2409.Which of the following is the Best Case Time Complexity of the Quicksort algorithm?

Easy
A O(n log n^2)
B O^2(n log n)
C O(n log n)
D None of these
Computer Terminology PPSC

Correct Answer: C

Quick Sort achieves its best-case time complexity of O(n log n) when the partitioning is balanced (the pivot splits the array into roughly equal halves).

Q2410.Which of the following is an Implementation of dynamic arrays in C++?

Easy
A List
B ArrayList
C Vector
D None of these
Computer Terminology PPSC

Correct Answer: C

In C++, the std::vector class implements a dynamic array that can automatically grow and shrink in size.

Q2411.What is the space complexity of the merge sort algorithm?

Easy
A O(n)
B O(n log n)
C O(n^2)
D None of these
Computer Terminology PPSC

Correct Answer: A

Merge Sort is not an in-place algorithm; it requires auxiliary arrays of size n during the merge phase, resulting in a space complexity of O(n).

Q2412.What is a Candidate Key in Database?

Easy
A The minimal set of attributes that uniquely identifies each occurrence of an entity type.
B Set of one or more attributes that can be used to uniquely identify the records in a table.
C The candidate key that is selected to uniquely identify each occurrence.
D None of these
Computer Terminology PPSC

Correct Answer: A

A Candidate Key is a minimal set of attributes that uniquely identifies each tuple (record) in a relation. One of these candidate keys is chosen as the primary key.

Q2413.What is the time complexity of searching for an element in a balanced binary search tree?

Easy
A O(1)
B O(n)
C O(log n)
D None of these
Computer Networks PPSC

Correct Answer: C

In a balanced Binary Search Tree (BST), the height is O(log n). Since each step of search eliminates half of the remaining subtrees, the search time complexity is O(log n).

Q2414.What is the worst case time complexity of a quick sort algorithm?

Easy
A O(log N)
B O(N log N)
C O(N^2)
D None of these
Computer Terminology PPSC

Correct Answer: C

Quick Sort has a worst-case time complexity of O(N^2), occurring when the pivot consistently partitions the array extremely unevenly (e.g., if the array is already sorted or reverse sorted).

Q2415.In which of the following facility, all of the work of thread management is done by the application and the kernel is not aware of the existence of threads?

Easy
A Single-Threaded Rendering facility
B Kernel Level Threads facility
C User Level Threads facility
D Multithreading Thread facility
Computer Terminology PPSC

Correct Answer: C

In User-Level Threads (ULT), all thread management is done by the application using a threads library. The kernel is unaware of these threads and schedules the process as a single unit.

Q2416.How are real numbers encoded to store in the computer?

Easy
A Scientific notation
B Floating-point notation
C Exponential notation
D None of these
General MCQs PPSC

Correct Answer: B

Real numbers (fractional numbers) are represented in computers using floating-point notation, typically following the IEEE 754 standard.

Q2417.Informally, an algorithm can be said to exhibit a growth rate on the order of a function f(n) if beyond a certain input size n, the function f(n) times a positive constant provides an upper bound or limit for the run-time of that algorithm. In other words, for a given input size n greater than some n0 and a constant c, the running time of that algorithm will never be larger than ______?

Easy
A c × f(n)
B c × f(n²)
C c² × f(n)
D None of these
Computer Terminology PPSC

Correct Answer: A

c × f(n). This is describing Big O notation, where f(n) is the growth rate of the algorithm's runtime. The definition says: For n greater than some n₀, there exists a constant c > 0 such that runtime ≤ c × f(n), meaning the runtime is bounded above by c × f(n).

Q2418.Which government app is used to facilitate citizens for certificates, licenses, and other public services?

Easy
A Social Media App
B E-Government App
C Gaming App
D Entertainment App
Internet Services & Communication PPSC

Correct Answer: B

E-Government apps are designed by government agencies to provide public services. Examples include the Pakistan Citizen Portal, Pak ID app, and e-Khidmat Markaz.

Q2419.Which cryptocurrency app allows P2P trading for Pakistani users?

Easy
A Coinbase
B Binance
C Robinhood
D Kraken
General MCQs PPSC

Correct Answer: B

Binance P2P is the most popular and widely used P2P trading platform for Pakistani users, allowing trading via local payment methods such as bank transfers, EasyPaisa, and JazzCash.

Q2420.How to add a filter in Excel?

Easy
A Go to Home → Paste
B Go to Data → Filter
C Right-click → Format Cells
D Insert → Chart
MS Excel PPSC

Correct Answer: B

Filters help display only the data you need in a table. To add a filter: Select your data → Data tab → Filter. Small dropdown arrows appear in the header row of your table.