Skip to main content

Interview Preperation Notes

Array

  1. Two Sum - Leetcode #1
  2. Best Time to Buy and Sell Stock - Leetcode #121
  3. Majority Element - Leetcode #169
  4. Contains Duplicate - Leetcode #217
  5. Meeting Rooms - Leetcode #252
  6. Move Zeroes - Leetcode #283
  7. Squares of a Sorted Array - Leetcode #977
  8. Insert Interval - Leetcode #57
  9. 3Sum - Leetcode #15
  10. Product of Array Except Self - Leetcode #238
  11. Combination Sum - Leetcode #39
  12. Merge Intervals - Leetcode #56
  13. Sort Colors - Leetcode #75
  14. Container with Most Water - Leetcode #11
  15. Gas Station - Leetcode #134
  16. Longest Consecutive Sequence - Leetcode #128
  17. Rotate Array - Leetcode #189
  18. Contiguous Array - Leetcode #525
  19. Subarray Sum Equals K - Leetcode #560
  20. Meeting Rooms II - Leetcode #253
  21. 3Sum Closest - Leetcode #16
  22. Non-overlapping Intervals - Leetcode #435
  23. Employee Free Time - Leetcode #759
  24. Sliding Window Maximum - Leetcode #239

Hash table

  1. Ransom Note - Leetcode #383
  2. Insert Delete GetRandom O(1) - Leetcode #380
  3. First Missing Positive - Leetcode #41

Math

  1. Roman to Integer - Leetcode #13
  2. Palindrome Number - Leetcode #9
  3. Random Pick with Weight - Leetcode #528
  4. Pow(x, n) - Leetcode #50
  5. Reverse Integer - Leetcode #7

Matrix

  1. Spiral Matrix - Leetcode #54
  2. Valid Sudoku - Leetcode #36
  3. Rotate Image - Leetcode #48
  4. Set Matrix Zeroes - Leetcode #73
  5. Sudoku Solver - Leetcode #37

Linked lists

  1. Merge Two Sorted Lists - Leetcode #21
  2. Linked List Cycle - Leetcode #141
  3. Reverse Linked List - Leetcode #206
  4. Middle of the Linked List - Leetcode #876
  5. Palindrome Linked List - Leetcode #234
  6. LRU Cache - Leetcode #146
  7. Remove Nth Node From End of List - Leetcode #19
  8. Swap Nodes in Pairs - Leetcode #24
  9. Odd Even Linked List - Leetcode #328
  10. Add Two Numbers - Leetcode #2
  11. Sort List - Leetcode #148
  12. Reorder List - Leetcode #143
  13. Rotate List - Leetcode #61
  14. Reverse Nodes in k-Group - Leetcode #25

Binary

  1. Add Binary - Leetcode #67
  2. Counting Bits - Leetcode #338
  3. Number of 1 Bits - Leetcode #191
  4. Single Number - Leetcode #136
  5. Missing Number - Leetcode #268
  6. Reverse Bits - Leetcode #190
  7. Find the Duplicate Number - Leetcode #287
  1. Binary Search - Leetcode #704
  2. First Bad Version - Leetcode #278
  3. Search in Rotated Sorted Array - Leetcode #33
  4. Time Based Key-Value Store - Leetcode #981
  5. Search a 2D Matrix - Leetcode #74
  6. Find Minimum in Rotated Sorted Array - Leetcode #153
  7. Maximum Profit in Job Scheduling - Leetcode #1235
  8. Median of Two Sorted Arrays - Leetcode #4

Recursion

  1. Permutations - Leetcode #46
  2. Subsets - Leetcode #78
  3. Letter Combinations of a Phone Number - Leetcode #17
  4. Next Permutation - Leetcode #31
  5. Generate Parentheses - Leetcode #22
  6. N-Queens - Leetcode #51

Stack

  1. Valid Parentheses - Leetcode #20
  2. Implement Queue using Stacks - Leetcode #232
  3. Backspace String Compare - Leetcode #844
  4. Evaluate Reverse Polish Notation - Leetcode #150
  5. Min Stack - Leetcode #155
  6. Daily Temperatures - Leetcode #739
  7. Decode String - Leetcode #394
  8. Asteroid Collision - Leetcode #735
  9. Basic Calculator II - Leetcode #227
  10. Trapping Rain Water - Leetcode #42
  11. Basic Calculator - Leetcode #224
  12. Largest Rectangle in Histogram - Leetcode #84
  13. Maximum Frequency Stack - Leetcode #895
  14. Longest Valid Parentheses - Leetcode #32

String

  1. Valid Palindrome - Leetcode #125
  2. Valid Anagram - Leetcode #242
  3. Longest Palindrome - Leetcode #409
  4. Longest Common Prefix - Leetcode #14
  5. Longest Substring Without Repeating Characters - Leetcode #3
  6. String to Integer (atoi) - Leetcode #8
  7. Longest Palindromic Substring - Leetcode #5
  8. Find All Anagrams in a String - Leetcode #438
  9. Group Anagrams - Leetcode #49
  10. Longest Repeating Character Replacement - Leetcode #424
  11. Largest Number - Leetcode #179
  12. Encode and Decode Strings - Leetcode #271
  13. Minimum Window Substring - Leetcode #76
  14. Palindrome Pairs - Leetcode #336

Queue

  1. Design Hit Counter - Leetcode #362

Binary Search Tree

  1. Lowest Common Ancestor of a Binary Search Tree - Leetcode #235
  2. Convert Sorted Array to Binary Search Tree - Leetcode #108
  3. Validate Binary Search Tree - Leetcode #98
  4. Kth Smallest Element in a BST - Leetcode #230
  5. Inorder Successor in BST - Leetcode #285

Binary Tree

  1. Invert Binary Tree - Leetcode #226
  2. Balanced Binary Tree - Leetcode #110
  3. Diameter of Binary Tree - Leetcode #543
  4. Maximum Depth of Binary Tree - Leetcode #104
  5. Same Tree - Leetcode #100
  6. Subtree of Another Tree - Leetcode #572
  7. Binary Tree Level Order Traversal - Leetcode #102
  8. Lowest Common Ancestor of a Binary Tree - Leetcode #236
  9. Binary Tree Right Side View - Leetcode #199
  10. Construct Binary Tree from Preorder and Inorder Traversal - Leetcode #105
  11. Path Sum II - Leetcode #113
  12. Maximum Width of Binary Tree - Leetcode #662
  13. Binary Tree Zigzag Level Order Traversal - Leetcode #103
  14. Path Sum III - Leetcode #437
  15. All Nodes Distance K in Binary Tree - Leetcode #863
  16. Serialize and Deserialize Binary Tree - Leetcode #297
  17. Binary Tree Maximum Path Sum - Leetcode #124

Graph

  1. Flood Fill - Leetcode #733
  2. 01 Matrix - Leetcode #542
  3. Clone Graph - Leetcode #133
  4. Course Schedule - Leetcode #207
  5. Number of Islands - Leetcode #200
  6. Rotting Oranges - Leetcode #994
  7. Accounts Merge - Leetcode #721
  8. Word Search - Leetcode #79
  9. Minimum Height Trees - Leetcode #310
  10. Pacific Atlantic Water Flow - Leetcode #417
  11. Shortest Path to Get Food - Leetcode #1730
  12. Graph Valid Tree - Leetcode #261
  13. Course Schedule II - Leetcode #210
  14. Number of Connected Components in an Undirected Graph - Leetcode #323
  15. Minimum Knight Moves - Leetcode #1197
  16. Cheapest Flights Within K Stops - Leetcode #787
  17. Word Ladder - Leetcode #127
  18. Longest Increasing Path in a Matrix - Leetcode #329
  19. Word Search II - Leetcode #212
  20. Alien Dictionary - Leetcode #269
  21. Bus Routes - Leetcode #815

Heap

  1. K Closest Points to Origin - Leetcode #973
  2. Task Scheduler - Leetcode #621
  3. Top K Frequent Words - Leetcode #692
  4. Find K Closest Elements - Leetcode #658
  5. Kth Largest Element in an Array - Leetcode #215
  6. Find Median from Data Stream - Leetcode #295
  7. Merge K Sorted Lists - Leetcode #23
  8. Smallest Range Covering Elements from K Lists - Leetcode #632

Trie

  1. Implement Trie (Prefix Tree) - Leetcode #208
  2. Word Break - Leetcode #139
  3. Design Add and Search Words Data Structure - Leetcode #211
  4. Design In-Memory File System - Leetcode #588

Dynamic Programming

  1. Maximum Subarray - Leetcode #53
  2. Coin Change - Leetcode #322
  3. Partition Equal Subset Sum - Leetcode #416
  4. Unique Paths - Leetcode #62
  5. House Robber - Leetcode #198
  6. Maximum Product Subarray - Leetcode #152
  7. Longest Increasing Subsequence - Leetcode #300
  8. Jump Game - Leetcode #55
  9. Maximal Square - Leetcode #221
  10. Decode Ways - Leetcode #91
  11. Combination Sum IV - Leetcode #377

Microservices

Application Architecture

  • Application API: Defines the endpoints and methods for communication between microservices and external clients.
  • Architecting: The process of designing the structure and interactions of microservices to meet business and technical requirements.
  • Architecture Documentation: Detailed documentation of the microservices architecture, including diagrams, data flow, and service interactions.
  • Dark Energy and Dark Matter: This seems unrelated to microservices. You might want to replace it with a relevant topic.
  • Loose Coupling: Ensuring that microservices are independent and changes in one service do not affect others.
  • Microservice Architecture: An architectural style that structures an application as a collection of loosely coupled services.
  • Observability: Techniques and tools to monitor, log, and trace microservices to ensure they are functioning correctly.
  • Refactoring to Microservices: The process of breaking down a monolithic application into microservices.
  • Security: Implementing security measures such as authentication, authorization, and encryption in microservices.
  • Service Collaboration: How microservices interact and collaborate to fulfill business processes.

Deployment

  • Docker: A platform for developing, shipping, and running applications in containers.
    • Multi-Architecture Docker Images: Docker images that support multiple CPU architectures, such as x86 and ARM.

Development

  • Software Delivery Metrics: Metrics to measure the performance and efficiency of software delivery processes in a microservices environment.

Microservices Adoption

  • Anti-Patterns: Common pitfalls and mistakes to avoid when adopting microservices.
  • Refactoring to Microservices: (Duplicate) Consider merging this with the earlier mention under Application Architecture.

Microservices.io Updates

  • Updates and new patterns from the Microservices.io website, which provides resources and patterns for microservices architecture.

Pattern

  • Microservice Chassis: A framework that provides common functionalities required by microservices, such as logging, configuration, and health checks.
  • Sagas: A pattern for managing distributed transactions in microservices.
  • Service Template: A template or blueprint for creating new microservices with standard configurations and practices.

Service Collaboration

  • Implementing Commands: Techniques for handling command operations in microservices.
  • Implementing Queries: Techniques for handling query operations in microservices.
  • Inter-Service Communication: Methods for communication between microservices, such as REST, gRPC, and messaging.
  • Service Discovery: Mechanisms for dynamically discovering and connecting to microservices.
  • Resilience: Strategies to ensure microservices can handle failures gracefully.
  • Service API: The interface through which microservices expose their functionalities.
  • Transactional Messaging: Ensuring message delivery and processing consistency in microservices.

Service Design

  • Service Collaboration: (Duplicate) Consider merging this with the earlier mention under Application Architecture.
  • Service Granularity: Determining the appropriate size and scope of microservices.
  • Service Collaboration: (Duplicate) Consider merging this with the earlier mention under Application Architecture.

AlgoMonster