**Problem Statement:**

You’re tasked with implementing a simple DNS (Domain Name System) resolver. The resolver maps domain names to their corresponding IP addresses. Implement a class called `DNSResolver` that supports the following operations:

1. **addDomain(domain, ip):** Adds a domain name and its corresponding IP address to the resolver.
2. **getIP(domain):** Retrieves the IP address associated with the given domain name. If the domain doesn’t exist, return `"Domain not found"`.

**Constraints:**

- Domain names consist of lowercase English letters, digits, and periods (`.`).
- IP addresses follow the format `"xxx.xxx.xxx.xxx"` where `xxx` is a number between 0 and 255.
- The total number of `addDomain` and `getIP` operations will not exceed 10.

**Example:**

```python
python
Copy code
# Initialize the resolver
resolver = DNSResolver()

# Add domains
resolver.addDomain("example.com", "93.184.216.34")
resolver.addDomain("openai.com", "104.18.12.197")

# Retrieve IPs
print(resolver.getIP("example.com"))   # Output: "93.184.216.34"
print(resolver.getIP("openai.com"))    # Output: "104.18.12.197"
print(resolver.getIP("nonexistent.com")) # Output: "Domain not found"

```

**Hint:** Consider which data structure allows for efficient insertion and lookup based on unique keys.

---

**Explanation and Thought Process:**

To design the `DNSResolver` class, let's focus on the following methods (behaviors):

1. **addDomain(domain, ip):** to add a domain name and its IP address.
2. **getIP(domain):** to retrieve the IP address associated with a domain name. If the domain is not found, it returns `"Domain not found"`.

We can think about the data structure needed here. Since we need to map a domain (a string) to an IP address (another string) and need efficient lookup for each domain, a hash map (or dictionary) will work well. This structure will allow for quick storage and retrieval of key-value pairs.

**Attributes:**
Our class will need two main attributes:

- **domainName:** a string to represent the domain name.
- **IP:** a string to store the IP address.

---

**Designing the addDomain Method**

The `addDomain` method should add a domain name and its IP address to a dictionary.

```python
python
Copy code
def addDomain(domainName: str, IP: str) -> dict:
    hash_map = {}
    hash_map[domainName] = IP
    return hash_map

```

Here's the complete `DNSResolver` class with corrected code for both `addDomain` and `getIP` methods:

```python
class DNSResolver:
    def __init__(self):
        # Initialize an empty dictionary to store domain-IP mappings
        self.hash_map = {}

    def addDomain(self, domain: str, ip: str):
        # Add the domain and IP to the dictionary
        self.hash_map[domain] = ip

    def getIP(self, domain: str) -> str:
        # Check if the domain exists in the dictionary and return its IP if found
        if domain in self.hash_map:
            return self.hash_map[domain]
        # Return "Domain not found" if the domain does not exist in the dictionary
        return "Domain not found"

```

### Explanation:

1. **`__init__` method**: Initializes an empty dictionary `hash_map` to store domain names as keys and IP addresses as values.
2. **`addDomain` method**: Adds a new domain name and its corresponding IP address to `hash_map`.
3. **`getIP` method**: Checks if the given domain exists in `hash_map` and returns the associated IP address. If the domain is not found, it returns `"Domain not found"`.

### Example Usage:

```python
# Initialize the resolver
resolver = DNSResolver()

# Add domains
resolver.addDomain("example.com", "93.184.216.34")
resolver.addDomain("openai.com", "104.18.12.197")

# Retrieve IPs
print(resolver.getIP("example.com"))   # Output: "93.184.216.34"
print(resolver.getIP("openai.com"))    # Output: "104.18.12.197"
print(resolver.getIP("nonexistent.com")) # Output: "Domain not found"

```

Q- remove duplicate text here and give me full markdown here