Independent Preparation Bank for Pakistani Computing Graduates • 100% Free • No Signup
NSCTTest.
Simulator
Home/Subjects/Problem Solving & Analytical Skills/Logical Reasoning Fundamentals
Problem Solving & Analytical SkillsTopic #3 of 565 MCQs Available

Logical Reasoning Fundamentals

Comprehensive question bank, step-by-step rationales, and dedicated timed quiz for Logical Reasoning Fundamentals.

Launch Quiz Mode ↗

Logical Reasoning Fundamentals Question Bank

Showing 65 questions of 65 with verified answers

11Multiple Choice

(Scenario-Based) An algorithm's runtime is described by the sequence 10, 20, 30, 40... ms for input sizes 1, 2, 3, 4. This represents an Arithmetic Progression (AP). What will the runtime be for an input size of 100?

12Multiple Choice

(Code-Math) To check if an integer n is an even number, which logical expression is the most efficient?

13Multiple Choice

(Calculation) You need to choose a 2-person "Security Committee" from a team of 5 developers. Order does not matter. How many different committees can be formed?

14Multiple Choice

(Conceptual) In Big-O analysis, which of the following mathematical functions grows the FASTEST as n becomes large?

15Multiple Choice

(Scenario-Based) A load balancer uses a "Weighted Round Robin" algorithm. Server A has weight 3, and Server B has weight 1. If 12 requests arrive, mathematically how many should go to Server A?

16Multiple Choice

(Calculation) What is the result of binary addition: 1011 + 0011?

17Multiple Choice

(Conceptual) Which mathematical property is used when we say (A AND

18Multiple Choice

(Scenario-Based) A 3D game engine uses Matrix Multiplication to rotate objects. If you multiply a 1x3 matrix by a 3x3 matrix, what are the dimensions of the resulting matrix?

19Multiple Choice

(Code-Math) A random number generator returns an integer between 1 and 100. What is the probability that the number generated is a Prime Number?

20Multiple Choice

(Calculation) If a system's uptime is "Three Nines" (99.9%), what is the maximum allowed downtime per year (approx 365 days)?

21Multiple Choice

(Conceptual) In Boolean Algebra, the expression A + 1 (where + is the OR operator and 1 is TRUE) always evaluates to:

22Multiple Choice

(Code-Math) To map a 2D array of size Rows x Cols into a 1D array, the index for an element at (row, col) is usually calculated as:

23Multiple Choice

(Calculation) What is the "Mode" of the following set of server response times (in ms): {10, 20, 20, 30, 40, 50, 20}?

24Multiple Choice

(Scenario-Based) A password requires 1 lowercase letter (26 options) and 1 digit (10 options). If the password MUST be exactly 2 characters long (Letter first, then Digit), how many unique passwords can be created?

25Multiple Choice

(Conceptual) Which mathematical concept explains why a hash collision is much more likely than people intuitively think, even in large data sets?

1Multiple Choice

(Conceptual) Which algorithmic paradigm is characterized by making the "best immediate choice" at each step without looking back or considering future consequences? • • • •

2Multiple Choice

(Scenario-Based) You are given an array that is "nearly sorted" (each element is at most 2 positions away from its correct spot). Which sorting algorithm would be the most efficient to finalize the sort?

3Multiple Choice

(Code Output / Logic) Trace a Binary Search on the sorted array [2, 5, 8, 12, 16, 23, 38, 56, 72, 91] to find the target 23. What is the value of the mid element in the first iteration?

4Multiple Choice

(Calculation) What is the maximum number of comparisons required to find an element in a sorted list of 1,000 items using Binary Search?

5Multiple Choice

(Comparison) What is the main analytical difference between Divide and Conquer and Dynamic Programming?

6Multiple Choice

(Debugging) A developer writes a recursive function to calculate the Factorial of n. It works for n=5, but for n=-1, the program crashes with a "Stack Overflow" error. What is missing?

7Multiple Choice

(Scenario-Based) You need to find the shortest path between two cities in a navigation app. The road weights (distances) are all positive. Which algorithm is the most efficient choice?

8Multiple Choice

(Code Output / Logic) Trace this pseudocode: function solve(n): if n <= 1: return n return n + solve(n - 2) print(solve(5))

9Multiple Choice

(Conceptual) In Big-O notation, an algorithm that processes a 2D matrix of size N x N using two nested loops usually has what time complexity?

10Multiple Choice

(Calculation) If an O(N^2) algorithm takes 1 second to process 1,000 items, how long will it approximately take to process 10,000 items?

11Multiple Choice

(Comparison) What is the main advantage of using a "Hash Table" for searching compared to a "Sorted Array with Binary Search"?

12Multiple Choice

(Scenario-Based) A company needs to compress a text file by assigning shorter binary codes to characters that appear frequently and longer codes to characters that appear rarely. Which algorithmic approach is used for this (Huffman Coding)?

13Multiple Choice

(Code Output / Logic) Trace the state of the array [5, 1, 4, 2] after **one full pass** of the Bubble Sort algorithm (ascending order).

14Multiple Choice

(Debugging) Why is the following pseudocode for Binary Search flawed? while (low <= high): mid = (low + high) / 2 if target == arr[mid]: return mid if target < arr[mid]: high = mid else: low = mid

15Multiple Choice

(Conceptual) Which algorithmic technique is used to solve the "N-Queens" problem, where you place queens on a board and "undo" a move if it leads to a conflict?

16Multiple Choice

(Scenario-Based) A massive database has 100 million unsorted records. You need to find the record for "John Doe" exactly once. What is the most efficient strategy?

17Multiple Choice

(Calculation) What is the Time Complexity of Merge Sort in the **worst case**?

18Multiple Choice

(Code Output / Logic) In a Selection Sort of [29, 10, 14, 37, 13], what is the *first** swap that occurs?

19Multiple Choice

(Comparison) When comparing Iteration (loops) to Recursion, which of the following is usually true regarding performance?

20Multiple Choice

(Conceptual) A "Deterministic" algorithm is one that:

21Multiple Choice

(Scenario-Based) You are designing a system to find the "Top 10 Most Visited Websites" from a log of 1 trillion entries. You have limited RAM. Which algorithmic concept is most helpful?

22Multiple Choice

(Code Output / Logic) Trace the two-pointer algorithm to reverse the string "ABCD". What is the state of the string after the **first** swap?

23Multiple Choice

(Calculation) An algorithm has a Big-O of O(2^N). If it takes 1ms to solve for N=10, how long will it take for N=20?

24Multiple Choice

(Debugging) What is the "Space Complexity" error in the following recursive code for Fibonacci? fib(n): return fib(n-1) + fib(n-2)

25Multiple Choice

(Conceptual) What does "Amortized Analysis" mean in algorithmic thinking?

1Multiple Choice

(Conceptual) In the context of system architecture, what does the term "Trade-off" primarily refer to?

2Multiple Choice

(Scenario-Based) A software team has spent $50,000 developing a feature that is now technically obsolete because of a new OS update. The lead developer says, "We must finish it anyway so the $50,000 isn't wasted." This is an example of which logical fallacy?

3Multiple Choice

(Scenario-Based) You are choosing a database for a global financial app. According to the CAP Theorem, if you prioritize "Consistency" (every user sees the same data at the same time) and "Partition Tolerance," what must you sacrifice during a network failure? •

4Multiple Choice

(Comparison) What is the key difference between Qualitative and Quantitative data in decision-making?

5Multiple Choice

(Calculation) You have two options for an API: - Option A: Costs $100/month and takes 2 hours of dev time to integrate. - Option B: Costs $0 but takes 40 hours of dev time to build. If a developer's time is worth $50/hour, which is the more cost-effective decision for the first month?

6Multiple Choice

(Scenario-Based) A bug is reported: "The app crashes when a user with the name 'NULL' tries to log in." Using the Eisenhower Matrix, this bug is classified as Urgent and Important. What is the correct decision?

7Multiple Choice

(Conceptual) "Confirmation Bias" in a software testing environment most likely leads to:

8Multiple Choice

(Scenario-Based) You notice that whenever the Marketing team sends a mass email, the website slows down. You conclude: "The email system is causing the website slowdown." This is a Correlation. Which step is required to prove Causation?

9Multiple Choice

(Debugging / Logic) A developer suggests: "We should rewrite our entire backend in the newest language (Rust) because it is faster and trending on GitHub." What is the main critical thinking flaw here?

10Multiple Choice

(Scenario-Based) A project manager asks for an estimate. You know the task will take 10 days, but you say 15 days "just in case." This decision is an application of:

11Multiple Choice

(Conceptual) What does the "Pareto Principle" (80/20 rule) suggest about debugging?

12Multiple Choice

(Scenario-Based) You have a limited budget. You can either: 1. Add a new feature users have been asking for. 2. Fix technical debt that makes the app slightly slow. Data shows that 50% of users leave the app if it takes > 3 seconds to load. Which is the more critical decision?

13Multiple Choice

(Comparison) When making a decision, what is the difference between a "Constraint" and a "Requirement"?

14Multiple Choice

(Calculation) A server has a 95% probability of staying up during a month. If you add a second identical redundant server (Failover), what is the probability that BOTH will fail at the same time?

15Multiple Choice

(Conceptual) "Analysis Paralysis" in decision-making refers to:

16Multiple Choice

(Scenario-Based) A junior dev says, "This function is slow because it uses a FOR loop." A critical thinker's first response should be:

17Multiple Choice

(Debugging / Logic) Which of the following is an example of "Divergent Thinking" in problem solving?

18Multiple Choice

(Conceptual) What does "Occam's Razor" suggest for decision-making in software design?

1Multiple Choice

(Conceptual) Which type of error is generally considered the most difficult to detect and fix, as the program continues to run without crashing?

2Multiple Choice

(Code Error / Debugging) A developer writes the following loop to find the average of an array arr of size N: sum = 0 for i from 1 to N: • • • sum = sum + arr[i] avg = sum / N Assuming 0-based indexing, what common error is present here?

3Multiple Choice

(Scenario-Based) A user reports that the app crashes only when they upload a file larger than 10MB. The developer tries with a 1MB file and says, "It works on my machine." What is the first step the developer should take for effective debugging?

4Multiple Choice

(Code Output / Logic) Trace the following pseudocode involving Exception Handling: try: x = 10 / 0 print("A") catch: print("B") finally: print("C")

5Multiple Choice

(Conceptual) What is a "Regression Bug"?

26Multiple Choice

Given the Boolean statement: (P AND Q) OR (P AND NOT Q), which of the following is logically equivalent?

29Multiple Choice

If statement 'All database queries with indexes are fast' is FALSE, which of the following must logically be TRUE?