interview
Capgiminin interview---Fail 1.Introduction 2.In dependency injection : scope and transient 3.Solid Principle in your project 4.write progrmme Given two inputs: Input 1: A list of numbers Input 2: A target number Find all distinct pairs from the list that add up to the target number. Example: Input 1: [8, 7, 1, 6, 5, 3, 2, 2, 4, 5] Input 2: 10 Output: 8, 2 7, 3 6, 4 5, 5 Below are clear and interview-ready answers for your next round: ✅ 2. Dependency Injection: Scoped vs Transient Transient A new instance is created every time it is requested. Best for lightweight, stateless services . Example: Utility classes, helper services, logging wrappers. services.AddTransient<IEmailService, EmailService>(); Scoped One instance per HTTP request . Shared across all components within the same request . Best for database operations , business logic tied to a single request. services.AddScoped...