This is a verified interview question from Blackrock. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Blackrock Online Assessment MCQS (SWE + Aladdin Data Role) 8 August 2026 - Manipal University" covers key patterns like Arrays.
"Blackrock Online Assessment MCQS (SWE + Aladdin Data role) ### 1. Analytical **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? - [ ] 10 - [ ] 12 - [ ] 14 - [ ] 16 ### 2. Aptitude - Diagnostic **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? - [ ] 1/4 - [ ] 2/5 - [ ] 1/3 - [ ] 1/2 ### 3. Aptitude - Defective chip **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? - [ ] 1/11 - [ ] 1/9 - [ ] 2/11 - [ ] 3/22 ### 4. Problem Solving (12-Queens) **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? - [ ] 12 - [ ] 24 - [ ] 144 - [ ] 1024 ### 5. Logical Reasoning (Snacks) **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? - [ ] P - [ ] Q - [ ] R - [ ] S ### 6. Aptitude (Spider) **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? - [ ] 8 - [ ] 9 - [ ] 10 - [ ] 12 ### 7. Aptitude (Pill Bottles) **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? - [ ] 10 - [ ] 20 - [ ] 55 - [ ] 100 ### 8. Logical Reasoning (Bridge Crossing) **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? - [ ] 23 - [ ] 24 - [ ] 26 - [ ] 28 ### 9. Problem Solving (Horses) **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? - [ ] 7 - [ ] 8 - [ ] 9 - [ ] 10 ### 10. Critical Reasoning - Paradox **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? - [ ] The statement relies on an implication that is vacuously true - [ ] Engineers are assumed to be omniscient - [ ] The CTO's statement is logically flawed - [ ] Security cannot be proven ### 11. Aptitude (Permutations) **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? - [ ] 204 - [ ] 218 - [ ] 192 - [ ] 248 ### 12. Critical Reasoning - Paradox (Surprise Test) **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? - [ ] Students made a logical fallacy in backward induction - [ ] The paradox proves prediction itself is impossible - [ ] Surprise is subjective, so logic does not apply - [ ] The reasoning assumes perfect knowledge that students do not have --- ## Software Engineering & Spring ### 13. Spring Data Repositories **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? - [ ] setUserAge method runs fine and sets user matching id age to the specified age value. - [ ] setUserAge throws InvalidDataAccessApiUsageException when executed - [ ] setUserAge method runs fine... if `@Transactional(readOnly = false)` is inserted - [ ] setUserAge method runs fine... if `@Modifying` and `@Transactional` are inserted ### 14. Data Mapping **Question:** 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? - [ ] Make a new output field of type integer Flag with the value MOD(V_count,200). a.V_count=IIF(V_count=200,1,V_count+1) b.Flag=V_count - [ ] Make a new output field of type integer Flag with the value MOD(V_count,200). a.V_count=V_count+1 b.Flag=MOD(V_count,200) - [ ] Make a new output field of type integer Flag with the value MOD(V_count,200). a.V_count=V_count-1 b.Flag=MOD(200,V_count) - [ ] Make a new output field of type integer Flag with the value MOD(V_count, 200). a.V_count+1=V_count b.MOD(V_count,200)=Flag --- ## Databases & SQL Concepts ### 15. Normal Form **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. - [ ] 1NF - [ ] 2NF - [ ] 3NF - [ ] BCNF ### 16. Aggregation Optimization (Databricks) **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)? - [ ] ... sensor_data.write.option("zorder_cols", "sensor_id")... sensor_data_zordered.cache() spark.conf.set("spark.sql.adaptive.enabled", "true") ... - [ ] (Other code variations omitted for brevity but conceptually represented as incorrect choices) ### 17. Data Concepts 16 **Question:** Which query returns departments with more than 5 employees? - [ ] SELECT department_id FROM employees WHERE COUNT(*) > 5 GROUP BY department_id; - [ ] SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(*) > 5; - [ ] SELECT department_id FROM employees HAVING COUNT(*) > 5; - [ ] SELECT department_id FROM employees WHERE employees > 5; ### 18. Data Concepts 18 **Question:** What does this query return? `SELECT department_id, AVG(salary) FROM employees GROUP BY department_id;` - [ ] Average salary across all employees - [ ] Average salary per department - [ ] Highest salary per department - [ ] Number of employees per department ### 19. Data Concepts 17 **Question:** What is wrong with this query? `SELECT department_id, employee_name, COUNT(*) FROM employees GROUP BY department_id;` - [ ] COUNT(*) cannot be used with GROUP BY - [ ] employee_name is selected but not grouped or aggregated - [ ] department_id cannot be grouped - [ ] Query must include ORDER BY ### 20. Data Concepts 19 **Question:** Which aggregate function ignores NULL values? - [ ] AVG() - [ ] SUM() - [ ] COUNT(column) - [ ] All of the above ### 21. Data Concepts 20 **Question:** Which query finds duplicate email addresses? - [ ] SELECT email FROM users WHERE COUNT(email) > 1; - [ ] SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1; - [ ] SELECT DISTINCT email FROM users WHERE email > 1; - [ ] SELECT email FROM users GROUP BY COUNT(email); ### 22. Data Concepts 66 **Question:** Which query helps detect duplicate primary key values? - [ ] SELECT id, COUNT(*) FROM table_name GROUP BY id HAVING COUNT(*) > 1; - [ ] SELECT id FROM table_name WHERE id IS NULL; - [ ] SELECT DISTINCT id FROM table_name; - [ ] SELECT COUNT(id) FROM table_name; ### 23. Data Concepts 67 **Question:** Which query detects unexpected NULLs in a required column? - [ ] SELECT * FROM table_name WHERE required_column IS NULL; - [ ] SELECT * FROM table_name WHERE required_column = NULL; - [ ] SELECT * FROM table_name WHERE required_column LIKE NULL; - [ ] SELECT * FROM table_name GROUP BY required_column; ### 24. Data Concepts 68 **Question:** Which technique helps validate that a child table does not reference missing parent records? - [ ] Anti-join child table to parent table - [ ] Sort both tables by name only - [ ] Count all rows in parent table - [ ] Use SELECT DISTINCT * only ### 25. Serializability **Question:** Consider the transactions (T1, T2) and schedules (S1, S2, S3). Which statement is true? - [ ] S1 is conflict serializable - [ ] S1 is conflict equivalent to S2 - [ ] S1 is conflict equivalent to S3 - [ ] S3 is conflict serializable ### 26. Candidate Key **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). - [ ] ABEFGH - [ ] ABH - [ ] AB - [ ] AH ### 27. PL/SQL: FORALL **Question:** 10000 records need transferring using FORALL. One bad record causes failure. Solution? - [ ] FORALL cannot be used for insertion - [ ] Use SAVE EXCEPTIONS - [ ] Select the bad data first and remove it - [ ] Use CURSOR for row-by-row processing ### 28. Database Operation (JDBC) **Question:** Which code block will update the emp_data column of the EMPLOYEE table using JDBC? - [ ] (Code block with ResultSet.CONCUR_UPDATABLE) - [ ] (Code block with ResultSet.FETCH_FORWARD) - [ ] (Code block with ResultSet.TYPE_SCROLL_SENSITIVE) - [ ] None of the above ### 29. Practical database partitioning **Question:** What is a good way to partition a database of users having just first name, last name, and unique integer? - [ ] Partition users by first letter of their names - [ ] Partition users by hash of the first letter - [ ] Partition users by their identifiers modulo m - [ ] Partition users by a hash of their identifiers modulo m ### 30. Errors in a Block (PL/SQL) **Question:** In PL/SQL code... - [ ] If the current block is not having the exception handler the enclosing block will be searched for one - [ ] If an error occurs in the DECLARE section of a block, immediately the enclosing block is searched - [ ] If an error occurs in the exception section of a block immediately the enclosing block is searched - [ ] none of these ### 31. Database normalization **Question:** In general, which of the following are true about database normalization? - [ ] Enforces better data integrity at the cost of greater storage space - [ ] Enforces better data integrity at the cost of reduced performance in data retrieval - [ ] Reduces used storage space - [ ] Performing updates to the normalized data is significantly easier and has better performance ### 32. Database Selection **Question:** A ride-hailing company with 50,000 drivers handles 2 million trips/day... needs to respond with current locations in < 50ms. Which database? - [ ] LevelDB - [ ] CouchDB - [ ] An external SQL database - [ ] An external key-value store like Cassandra ### 33. Identify Logical Database Structures **Question:** Which of the following are logical structures in a database? - [ ] Redo logs - [ ] Data files - [ ] Data blocks - [ ] Control files --- ## Cloud Architecture & Security (AWS/General Cloud) ### 34. S2 Q14 - Load balancer **Question:** What does a load balancer do? - [ ] Encrypts all databases - [ ] Stores files - [ ] Distributes traffic across backend targets - [ ] Generates AI embeddings ### 35. S2 Q23 - Egress risk **Question:** Why should data egress be considered in cloud architecture? - [ ] It can introduce cost, latency, and security considerations - [ ] It is always free and instant - [ ] It only affects UI design - [ ] It prevents encryption ### 36. S2 Q24 - Secrets in logs **Question:** What is the best reason to avoid logging tokens and secrets? - [ ] Logs are never stored - [ ] Logs may be widely accessible or retained, causing credential leakage - [ ] Secrets make logs too short - [ ] Logging secrets improves debugging safely ### 37. S2 Q25 - Cloud key rotation **Question:** What is secret or key rotation? - [ ] Changing cloud regions - [ ] Compressing storage keys - [ ] Making keys public - [ ] Periodically replacing credentials to reduce exposure ### 38. S2 Q28 - Public bucket risk **Question:** What is the biggest risk of accidentally public object storage containing internal files? - [ ] Files become compressed - [ ] Unauthorized data exposure - [ ] AI models stop working - [ ] The bucket becomes read-only ### 39. S2 Q29 - WAF **Question:** What is a web application firewall primarily used for? - [ ] Replacing unit tests - [ ] Storing large files - [ ] Running GPU workloads - [ ] Filtering and blocking malicious web traffic patterns ### 40. S2 Q20 - Network segmentation **Question:** What is network segmentation intended to reduce? - [ ] Use of private IP addresses - [ ] Blast radius by limiting communication between systems - [ ] The number of developers - [ ] Data durability ### 41. S2 Q13 - Security group/firewall **Question:** What is the purpose of a cloud firewall or security group? - [ ] To increase memory - [ ] To classify prompts - [ ] To create object storage - [ ] To control allowed inbound and outbound traffic ### 42. S2 Q12 - Private subnet **Question:** Why place databases in private subnets? - [ ] To make them easier to access publicly - [ ] To reduce direct exposure to the internet - [ ] To disable backups - [ ] To avoid authentication --- ## AI & Machine Learning Integrations ### 43. S2 Q19 - Model output validation **Question:** Why should structured AI outputs be validated programmatically before use? - [ ] The model may produce malformed, missing, or semantically invalid fields - [ ] Validation makes output creative - [ ] Validation trains the model - [ ] Validation removes all need for tests ### 44. S2 Q17 - Data leakage **Question:** Which scenario is the clearest example of AI data leakage? - [ ] AI summarizes public documentation - [ ] AI refuses an unsafe request - [ ] AI asks for clarification - [ ] A chatbot reveals confidential client data to an unauthorized user ### 45. S2 Q16 - AI access control **Question:** Why must RAG retrieval enforce document-level permissions? - [ ] To make answers longer - [ ] To avoid exposing documents the user is not allowed to see - [ ] To improve temperature settings - [ ] To skip indexing ### 46. S2 Q05 - Citation value **Question:** Why are citations useful in a RAG system? - [ ] They help users verify the source of claims - [ ] They make all answers correct - [ ] They reduce network latency - [ ] They eliminate access control ### 47. S2 Q04 - Prompt injection basic **Question:** What is prompt injection? - [ ] Adding examples to improve output - [ ] Malicious or unintended input that tries to override instructions - [ ] Compressing a prompt - [ ] Tokenizing a sentence ### 48. S2 Q03 - Human review **Question:** When is human review especially important for AI output? - [ ] Only when output is creative - [ ] Never, if the model is large - [ ] Only when the answer is short - [ ] When decisions affect people, finances, compliance, or production systems ### 49. S2 Q02 - Bias **Question:** What is bias in AI output? - [ ] A billing report - [ ] A vector database error - [ ] A systematic unfair or skewed pattern in responses - [ ] A file storage format ### 50. S2 Q01 - Sensitive data in prompts **Question:** Why should employees avoid putting sensitive client or internal data into unmanaged AI tools? - [ ] AI cannot read sensitive text - [ ] It may be logged, exposed, or processed outside approved controls - [ ] Sensitive data always improves accuracy - [ ] It prevents hallucination --- ## Design Patterns & Principles ### 51. DP-H-025 (Template Method) **Question:** What is the principal risk of Template Method's hook methods? - [ ] Subclasses cannot call the template method - [ ] Subclasses can break the algorithm by overriding non-abstract hook methods with incompatible behavior - [ ] The template method cannot call private methods - [ ] The algorithm structure is visible to clients ### 52. DP-H-067 (Spring AOP) **Question:** How does Spring AOP use the Proxy pattern, and what is the limitation of interface-based proxies? - [ ] Spring AOP uses Decorator; no limitations - [ ] Spring AOP creates JDK dynamic proxies (for interfaces) or CGLIB proxies (for classes); JDK proxies only intercept interface method calls, bypass advice - [ ] Spring uses Chain of Responsibility for AOP - [ ] CGLIB proxies only work with abstract classes ### 53. DP-H-059 (Singleton Testability) **Question:** How does an overused Singleton create testability problems, and what is the recommended fix? - [ ] Singletons are always thread-unsafe, so tests fail; fix by synchronizing - [ ] Singletons introduce global shared state that persists between tests; fix by injecting the dependency via an interface/test double - [ ] Singletons cannot be instantiated in test frameworks; fix by using reflection - [ ] Singletons prevent mocking because they are final ### 54. DP-H-033 (SOLID) **Question:** A UserService handles persistence, email notification, and authentication. Which SOLID principle is violated and what is the correct fix? - [ ] OCP; split into user, email, auth services connected by interfaces - [ ] SRP; refactor into separate UserRepository, EmailService, and AuthService classes - [ ] DIP; inject dependencies into a single UserService - [ ] ISP; create separate interfaces for each responsibility ### 55. DP-M-054 (Repository Pattern) **Question:** The Repository pattern builds primarily on which GoF pattern? - [ ] Command - [ ] Observer - [ ] Facade (abstracting data access behind a collection-like interface) - [ ] Factory Method ### 56. DP-M-045 (Abstract Factory vs Factory Method) **Question:** When should you choose Abstract Factory over Factory Method? - [ ] When you need a single product created by client - [ ] When you need to create families of related products that must be used together - [ ] When the factory needs to be a Singleton - [ ] When product creation involves many optional steps ### 57. DP-M-037 (Dependency Inversion) **Question:** The Dependency Inversion Principle requires: - [ ] All dependencies to be injected via constructors only - [ ] High-level and low-level modules to both depend on abstractions - [ ] Avoiding all use of concrete classes - [ ] Interfaces to be as large as possible ### 58. DP-M-005 (Creational Patterns) **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? - [ ] Abstract Factory uses inheritance; Factory Method uses composition - [ ] Abstract Factory produces families of related objects; Factory Method produces single type - [ ] Abstract Factory is structural; Factory Method is creational - [ ] Abstract Factory cannot be combined with Singleton ### 59. DP-M-067 (Decorator) **Question:** Java.io.InputStream wrapped by BufferedInputStream is an example of which pattern? - [ ] Proxy - [ ] Decorator - [ ] Adapter - [ ] Facade ### 60. DP-M-033 (Single Responsibility) **Question:** Which SOLID principle states that a class should have only one reason to change? - [ ] Single Responsibility Principle - [ ] Open/Closed Principle - [ ] Interface Segregation Principle - [ ] Dependency Inversion Principle ### 61. DP-M-021 (Observer) **Question:** The Observer pattern establishes which relationship between subject and observers? - [ ] One-to-one - [ ] Many-to-many - [ ] One-to-many - [ ] Many-to-one ### 62. DP-M-011 (Adapter) **Question:** What is the primary purpose of the Adapter pattern? - [ ] Add behavior to objects dynamically - [ ] Convert an interface into another interface clients expect - [ ] Provide a simplified interface to a complex subsystem - [ ] Separate abstraction from implementation ### 63. DP-M-001 (Singleton) **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? - [ ] Create families of related objects - [ ] Clone existing objects - [ ] Ensure a class has only one instance and provide a global access point - [ ] Define an interface for creating objects ### 64. DP-S-018 (Template Method) **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? - [ ] Strategy - [ ] Chain of Responsibility - [ ] Template Method - [ ] Builder ### 65. DP-S-014 (Observer) **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? - [ ] Mediator - [ ] Observer - [ ] Command - [ ] Chain of Responsibility ### 66. DP-S-010 (Composite) **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? - [ ] Flyweight - [ ] Composite - [ ] Decorator - [ ] Proxy ### 67. DP-S-073 (Facade) **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? - [ ] Adapter - [ ] Proxy - [ ] Facade - [ ] Bridge ### 68. DP-S-069 (Template Method) **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? - [ ] Chain of Responsibility - [ ] Template Method - [ ] Strategy - [ ] Builder ### 69. DP-S-057 (Observer) **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? - [ ] Command - [ ] Mediator - [ ] Observer - [ ] Strategy ### 70. DP-S-049 (Iterator) **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? - [ ] Visitor - [ ] Iterator - [ ] Strategy - [ ] Composite ### 71. DP-S-029 (Adapter) **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? - [ ] Facade - [ ] Adapter - [ ] Proxy - [ ] Flyweight ### 72. DP-S-009 (Decorator) **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? - [ ] Proxy - [ ] Adapter - [ ] Decorator - [ ] Bridge ### 73. DP-S-045 (Strategy) **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? - [ ] Template Method - [ ] Observer - [ ] Abstract Factory - [ ] Strategy ### 74. DP-S-021 (Command) **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? - [ ] Observer - [ ] Strategy - [ ] Command - [ ] Template Method ### 75. DP-S-001 (Factory Method) **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? - [ ] Singleton - [ ] Factory Method - [ ] Builder - [ ] Prototype ### 76. DP-H-009 (Factory Trade-offs) **Question:** What is the core trade-off of using Factory Method over direct instantiation with new? - [ ] Factory Method is always slower due to the extra method call - [ ] Factory Method decouples the client from concrete types at the cost of a parallel class hierarchy - [ ] Factory Method prevents unit testing because the factory cannot be mocked - [ ] Factory Method forces the product to be a Singleton ### 77. DP-H-054 (Strategy Selection) **Question:** How would you combine Strategy + Factory + Registry to allow runtime algorithm selection? - [ ] Factory creates strategies; Registry selects based on config; Strategy executes - [ ] Strategies are registered in a map by key; Factory looks up and returns the appropriate Strategy, client depends only on interface - [ ] Registry is a Singleton Factory that returns all strategies - [ ] Strategy is a special case of Factory that delegates to a Registry ### 78. DP-H-045 (Observer Issues) **Question:** When does Observer become a poor choice for managing object communication? - [ ] When there are more than 10 observers - [ ] When update dependencies between objects are complex or circular, making event cascades unpredictable - [ ] When observers are defined at compile time - [ ] When the subject has only one type of event"
Join thousands of developers practicing for Blackrock.