### Implementing Registry Design Pattern in Python

What is Registry Pattern?
Registry should be understood as a global object that maintains track of instances. This global is usually a dictionary or an associate array with the keys being the identifiers for the values stored in the dictionary.

### LeetCode - Longest Substring Without Repeating Characters - O(n) - Java

Given a string, find the length of the longest substring without repeating characters.
Example 1:
```Input: "abcabcbb"
Output: 3
Explanation: The answer is `"abc"`, with the length of 3.
```
Example 2:
```Input: "bbbbb"
Output: 1
Explanation: The answer is `"b"`, with the length of 1.
```
Example 3:
```Input: "pwwkew"
Output: 3
Explanation: The answer is `"wke"`, with the length of 3.
Note that the answer must be a substring, `"pwke"` is a subsequence and not a substring```

Solution

### LeetCode - Two Sum O(n) Solution in Java

Problem

Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
```Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].```

Solution:

The idea is to maintain a hash map to store the elements that you have seen as we iterate over the array. For every number we try to see if we have a complement i.e (target-current no) in our hash map. If we find the number in our hash map, we have our answer.

Space Complexity: O(n)
Time Complexity: O(n)

### Must do questions for software engineering interviews - LeetCode

These questions are in no particular order. Every question will give you enough exposure to strategies and techniques required to solve most of the problem solving & data structures related questions in the interviews.

Some of the techniques used in these problems are two pointers, invariant windows, binary search, DFS/BFS, recursion, interval scheduling related, simple DP and bit manipulation, heaps, data structure design etc.