Blackrock Online Assessment MCQS (SWE + Aladdin Data role)
Question: Starting at (0,0), you want to reach (4,4) by moving only Right or Up one unit at a time. Coordinates (1,1) and (3,3) contain landmines and cannot be used. How many completely safe paths exist?
Question: A diagnostic test detects a condition correctly 90% of the time when the condition is present, and correctly returns negative 80% of the time when the condition is absent. If 10% of people have the condition, what is the probability that a person actually has the condition given that the test result is positive?
Question: A batch has 4 defective chips and 8 good chips. Two chips are picked sequentially without replacement. What is the probability that both are defective?
Question: In the 12-Queens problem, after placing the first queen somewhere in row 1, how many possible positions are there for placing the next queen in row 2 before checking diagonal conflicts?
Question: People P, Q, R and S each like one different snack among Sandwich, Noodles, Pasta and Salad. Clues: P does not eat Salad. Q eats Noodles. R does not eat Pasta. S eats Salad. Who eats Sandwich?
Question: A spider starts at one vertex (corner) of a wireframe cube. Every minute, the spider randomly chooses one of the three adjacent edges and crawls to the next vertex. What is the expected number of moves needed to reach the vertex diagonally opposite the starting point?
Question: Ten bottles contain pills. One bottle contains pills that are 2 grams heavier. You may use a digital scale exactly once. What is the minimum total number of pills you need to weigh to identify the heavier bottle?
Question: Four people take 1, 4, 7 and 11 minutes respectively to cross a bridge. A torch is required to cross the bridge, at most two people can cross at a time, and a pair moves at the slower speed compared to a single person's speed. What is the minimum total time needed for all to cross?
Question: There are 25 horses and only 5 can race at a time. You only get the relative ranking within each race, with no timings. What is the minimum number of races required to identify the top 4 horses?
Question: In a company, the CTO says: "There exists at least one engineer who, if they know the system is secure, then the system is secure." This seems trivially true. However: No engineer actually knows whether the system is secure. Why does the statement still hold?
Question: How many permutations of the letters W, X, Y, Z, A, B satisfy all of the following conditions? W is not in position 1, XXX and YYY are not adjacent, and ZZZ appears before AAA?
Question: A professor announces: "There will be exactly one surprise test next week (Monday-Friday), and you will not be able to predict the day beforehand." Students reason it cannot be Friday, then Thursday, and eliminate all days. Conclusion: No test is possible. However, the test is on Wednesday, and students are surprised. What explains this paradox?
Question: Given a users table and a Spring Data JPA Repository interface extending JpaRepository<User, Integer>. What is the result of using a custom @Query("update User u set u.age = ?2 where u.id = ?1") void setAge(int id, int age); in the Repository and calling it from a Service?
@Transactional(readOnly = false) is inserted@Modifying and @Transactional are insertedQuestion: Design a mapping to load every 200th record to the target table, e.g., if the source has 600 records, load only the 200th, 400th, and 600th. In the implementation steps, what should replace Step 3?
Question: Given the following functional dependencies, find the highest normal form. Assume that the given relation is in 1NF already. R(A,B,C,D,E,F). Functional Dependencies: BC->E, BE->F, AF->DE.
Question: There is a need to optimize a Databricks Delta Lake table sensor data for frequent analytical aggregations. Which implementation applies advanced optimizations (ZORDER, Caching, Adaptive Query Execution)?
Question: Which query returns departments with more than 5 employees?
Question: What does this query return? SELECT department_id, AVG(salary) FROM employees GROUP BY department_id;
Question: What is wrong with this query? SELECT department_id, employee_name, COUNT(*) FROM employees GROUP BY department_id;
Question: Which aggregate function ignores NULL values?
Question: Which query finds duplicate email addresses?
Question: Which query helps detect duplicate primary key values?
Question: Which query detects unexpected NULLs in a required column?
Question: Which technique helps validate that a child table does not reference missing parent records?
Question: Consider the transactions (T1, T2) and schedules (S1, S2, S3). Which statement is true?
Question: Given the functional dependencies: 1. B->CD, 2. ACD->BE, 3. BD->EF, 4. D->G, 5. H->G for R(A,B,C,D,E,F,G,H). Find the candidate key(s).
Question: 10000 records need transferring using FORALL. One bad record causes failure. Solution?
Question: Which code block will update the emp_data column of the EMPLOYEE table using JDBC?
Question: What is a good way to partition a database of users having just first name, last name, and unique integer?
Question: In PL/SQL code...
Question: In general, which of the following are true about database normalization?
Question: A ride-hailing company with 50,000 drivers handles 2 million trips/day... needs to respond with current locations in < 50ms. Which database?
Question: Which of the following are logical structures in a database?
Question: What does a load balancer do?
Question: Why should data egress be considered in cloud architecture?
Question: What is the best reason to avoid logging tokens and secrets?
Question: What is secret or key rotation?
Question: What is the biggest risk of accidentally public object storage containing internal files?
Question: What is a web application firewall primarily used for?
Question: What is network segmentation intended to reduce?
Question: What is the purpose of a cloud firewall or security group?
Question: Why place databases in private subnets?
Question: Why should structured AI outputs be validated programmatically before use?
Question: Which scenario is the clearest example of AI data leakage?
Question: Why must RAG retrieval enforce document-level permissions?
Question: Why are citations useful in a RAG system?
Question: What is prompt injection?
Question: When is human review especially important for AI output?
Question: What is bias in AI output?
Question: Why should employees avoid putting sensitive client or internal data into unmanaged AI tools?
Question: What is the principal risk of Template Method's hook methods?
Question: How does Spring AOP use the Proxy pattern, and what is the limitation of interface-based proxies?
Question: How does an overused Singleton create testability problems, and what is the recommended fix?
Question: A UserService handles persistence, email notification, and authentication. Which SOLID principle is violated and what is the correct fix?
Question: The Repository pattern builds primarily on which GoF pattern?
Question: When should you choose Abstract Factory over Factory Method?
Question: The Dependency Inversion Principle requires:
Question: Both patterns decouple client code from concrete class names. However, one creates a single product type while the other creates an entire coordinated suite of related products. What is the key structural distinction?
Question: Java.io.InputStream wrapped by BufferedInputStream is an example of which pattern?
Question: Which SOLID principle states that a class should have only one reason to change?
Question: The Observer pattern establishes which relationship between subject and observers?
Question: What is the primary purpose of the Adapter pattern?
Question: A distributed logging framework requires every application component to write to the same single log file handle. Which design goal must the class managing this handle satisfy above all others?
Question: A data import system supports CSV, JSON, and XML. Each format follows the same pipeline: validate, parse, transform, persist. Only specific steps differ per format. What pattern applies?
Question: A stock trading platform must notify multiple systems (dashboard, alert service, audit log) whenever a trade is executed. Systems must subscribe/unsubscribe dynamically. What pattern applies?
Question: A financial portfolio system must treat individual positions and groups of positions (sub-portfolios) identically for valuation and risk calculations. What pattern enables this?
Question: A legacy ERP system has a complex subsystem for generating financial reports. Your new frontend needs a single clean interface to generate any report type without understanding ERP internals. What applies?
Question: A web scraper must parse data from multiple websites. Each site has different HTML structure, but the scraping pipeline (fetch, parse, extract, store) is the same. What pattern fits?
Question: A smart home controller must update the app UI, send push notifications, and log to cloud whenever a device state changes. Devices and consumers must remain decoupled. What pattern applies?
Question: A task scheduler supports multiple queue types (priority queue, FIFO, deadline-based). The scheduler must traverse tasks in different orders without task objects knowing which queue they are in. What pattern applies?
Question: You are building an IDE plugin system where plugins are developed by third parties. Plugins must conform to your interface but each has its own internal API. How do you integrate them?
Question: You need to add request logging, authentication, and response compression to an existing API client without modifying its class. These features must be toggleable and combinable. What pattern fits?
Question: A streaming platform runs A/B testing of recommendation algorithms. Users in group A get collaborative filtering; group B gets content-based filtering. The algorithm is swappable per request. What applies?
Question: A ride-sharing app must record every driver action (accept ride, start trip, end trip) so dispatchers can replay events for auditing and the system can retry failed operations. What pattern fits?
Question: Your application must dynamically support multiple payment options (CreditCard, PayPal, UPI) based on the user's input. How do you architect a system that is clean, scalable, and easy to maintain?
Question: What is the core trade-off of using Factory Method over direct instantiation with new?
Question: How would you combine Strategy + Factory + Registry to allow runtime algorithm selection?
Question: When does Observer become a poor choice for managing object communication?
BlackRock • Pending