Prepare for your software engineering interview with these frequently asked questions. Each answer includes what interviewers are looking for and how to structure your response. Practice with our AI Mock Interview for real-time feedback.
REST uses multiple endpoints with fixed data structures, while GraphQL uses a single endpoint with client-specified queries. Choose REST for simple CRUD APIs with caching needs. Choose GraphQL when clients need flexible data fetching, like mobile apps that want to minimize network requests. Mention trade-offs: REST is simpler to cache, GraphQL reduces over-fetching.
Discuss the key components: hash generation (base62 encoding of auto-increment ID or MD5), database schema (short_url, original_url, created_at, click_count), redirect flow (301 vs 302), and scaling considerations (read-heavy workload, caching with Redis, database sharding). Mention analytics tracking and rate limiting.
SQL databases (PostgreSQL, MySQL) are relational with ACID guarantees — best for structured data with complex relationships. NoSQL (MongoDB, DynamoDB) offers flexible schemas and horizontal scaling — best for rapidly changing schemas, high write throughput, or document-oriented data. Mention CAP theorem trade-offs.
Use the STAR method. Describe the Situation and conflicting approaches. Explain how you presented data or prototypes to support your position. Show that you listened to the other perspective and found a compromise. End with the positive outcome and what you learned about collaboration.
Choose a specific example. Explain what motivated the technology choice, your learning approach (documentation, tutorials, building a prototype), how you applied it to the project, and the result. Show adaptability and self-directed learning ability.
Discuss your approach: code reviews, automated testing (unit, integration, e2e), CI/CD pipelines, linting and formatting tools, TypeScript or type systems, and documentation. Give specific examples of bugs caught by tests or quality improvements you led.
Cover JWT vs session-based auth, OAuth 2.0 for third-party login, role-based access control (RBAC), token refresh strategies, secure storage (httpOnly cookies vs localStorage), and password hashing (bcrypt). Mention OWASP security best practices.
Explain your framework: urgency vs importance matrix, communicating with stakeholders about trade-offs, breaking large tasks into smaller deliverables, using tools like Jira for tracking, and regularly re-evaluating priorities as requirements change.
A process is an independent program with its own memory space. Threads share memory within a process and are lighter-weight. Processes communicate via IPC (pipes, sockets), threads communicate via shared memory. Discuss concurrency challenges: race conditions, deadlocks, and synchronization mechanisms.
CI (Continuous Integration) automatically builds and tests code on every commit. CD (Continuous Deployment) automatically deploys to production after tests pass. Describe your pipeline: trigger (push/PR), build, lint, test (unit + integration), deploy to staging, smoke tests, production deploy. Mention tools: GitHub Actions, Jenkins, CircleCI.