teleren/devto huggingface dataset:
2045. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:22:42

```
class Solution {
 public:
  int secondMinimum(int n, vector<vector<int>>& edges, int time, int change) {
    vector<vector<int>> graph(n + 1);
    queue<pair<int, int>> q{{{1, 0}}};
    // minTime[i][0] := 1st min time to reach node i
    // minTime[i][1] := 2nd min time to reach node i
    vector<vector<int>> minTime(n + 1, vector<int>(2, INT_MAX));
    minTime[1][0] = 0;

    for (const auto& e : edges) {
      const int u = e[0];
      const int v = e[1];
      graph[u].push_back(v);
      graph[v].push_back(u);
    }

    while (!q.empty()) {
      const auto [i, prevTime] = q.front();
      q.pop();
      // start from green
      // if numChangeSignal is odd -> now red
      // if numChangeSignal is even -> now green
      const int numChangeSignal = prevTime / change;
      const int waitTime =
          numChangeSignal & 1 ? change - (prevTime % change) : 0;
      const int newTime = prevTime + waitTime + time;
      for (const int j : graph[i])
        if (newTime < minTime[j][0]) {
          minTime[j][0] = newTime;
          q.emplace(j, newTime);
        } else if (minTime[j][0] < newTime && newTime < minTime[j][1]) {
          if (j == n)
            return newTime;
          minTime[j][1] = newTime;
          q.emplace(j, newTime);
        }
    }

    throw;
  }
};

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/second-minimum-time-to-reach-destination/
2030. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:21:04

```
class Solution {
 public:
  string smallestSubsequence(string s, int k, char letter, int repetition) {
    string ans;
    vector<char> stack;
    int required = repetition;
    int nLetters = count(begin(s), end(s), letter);

    for (int i = 0; i < s.length(); ++i) {
      const char c = s[i];
      while (!stack.empty() && stack.back() > c &&
             stack.size() + s.length() - i - 1 >= k &&
             (stack.back() != letter || nLetters > required)) {
        const char popped = stack.back();
        stack.pop_back();
        if (popped == letter)
          ++required;
      }
      if (stack.size() < k)
        if (c == letter) {
          stack.push_back(c);
          --required;
        } else if (k > stack.size() + required) {
          stack.push_back(c);
        }
      if (c == letter)
        --nLetters;
    }

    for (const char c : stack)
      ans += c;

    return ans;
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/smallest-k-length-subsequence-with-occurrences-of-a-letter/
Creating Your Private Versions of Public Docker Images in ECR
Tags: aws, docker, devops
Published: 2022-07-06 11:20:18

## Why do this?
One reason could be avoiding Docker Hub's free tier rate limits. If your team uses free Docker Hub, you might run into rate limits while pulling images into something like AWS CodeBuild. The rate limit is set to 100 pulls per 6 hours per IP address if you are anonymous and 200 pulls per 6 hours for authenticated users with a Docker ID.
![Example of Docker Hub CodeBuild rate limit error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojo7m18j2ykkj3dcb0pd.png)
 

## Creation process
You can create an ECR Repository following [this guide](https://dev.to/femilawal/creating-an-elastic-container-registry-repo-with-cloudformation-f5d).
We will save an image of [ubuntu](https://hub.docker.com/_/ubuntu)
![Ubuntu docker hub page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cnl0w2g2pt4j5yo2d0x.png)
First, pull the docker image: 
```bash
docker pull ubuntu:20.04
``` 
You should get an output similar to this:
![Docker Pull](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24n5f0pzv2qd1ssk5nyo.png)
Then create a target image tag that refers to the source image:
```bash
docker tag ubuntu:20.04 YOUR_AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ecr-repository
```
Before you can push to ECR, you have to authenticate:
```bash
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin YOUR_AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com
```
The output should be:
![Authentication success](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vw1i8c08mmntvjfqtr04.png)
Then push the image:
```bash
docker push YOUR_AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ecr-repository
```
The output should be:
![ECR Push output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ei189pln0q3b32bnqen.png)
You can confirm it's creation in the AWS console:
![ECR Repo in console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl993rtx0gjqyepnuvh2.png)
 
## Cleanup
Always remember to clean up resources you do not need.
First delete the image:
```bash
aws ecr batch-delete-image --repository-name ecr-repository --image-ids imageTag=latest
```

![Delete image output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3eoa4zyyckfitryz01b.png)
Assuming you used the CloudFormation template from [this lesson](https://dev.to/femilawal/creating-an-elastic-container-registry-repo-with-cloudformation-f5d), delete the repository by running: 
```bash
aws cloudformation delete-stack --stack-name ecr-repository
```
2071. Leetcode Solution in CPP
Tags: cpp
Published: 2022-07-06 11:19:40

```
class Solution {
 public:
  int maxTaskAssign(vector<int>& tasks, vector<int>& workers, int pills,
                    int strength) {
    int ans = 0;
    int l = 0;
    int r = min(tasks.size(), workers.size());

    sort(begin(tasks), end(tasks));
    sort(begin(workers), end(workers));

    // can we finish k tasks?
    auto canComplete = [&](int k, int pillsLeft) {
      // k strongest workers
      map<int, int> sortedWorkers;
      for (int i = workers.size() - k; i < workers.size(); ++i)
        ++sortedWorkers[workers[i]];

      // out of the k smallest tasks
      // start from the biggest one
      for (int i = k - 1; i >= 0; --i) {
        // find the first worker that has strength >= tasks[i]
        auto it = sortedWorkers.lower_bound(tasks[i]);
        if (it != end(sortedWorkers)) {
          if (--(it->second) == 0)
            sortedWorkers.erase(it);
        } else if (pillsLeft > 0) {
          // find the first worker that has strength >= tasks[i] - strength
          it = sortedWorkers.lower_bound(tasks[i] - strength);
          if (it != end(sortedWorkers)) {
            if (--(it->second) == 0)
              sortedWorkers.erase(it);
            --pillsLeft;
          } else {
            return false;
          }
        } else {
          return false;
        }
      }

      return true;
    };

    while (l <= r) {
      const int m = (l + r) / 2;
      if (canComplete(m, pills)) {
        ans = m;
        l = m + 1;
      } else {
        r = m - 1;
      }
    }

    return ans;
  }
};

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/maximum-number-of-tasks-you-can-assign/
2088. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:18:21

```
class Solution {
 public:
  int countPyramids(vector<vector<int>>& grid) {
    int ans = count(grid);
    reverse(begin(grid), end(grid));
    ans += count(grid);
    return ans;
  }

 private:
  // dp[i][j] := max height of the pyramid for which it is the apex
  int count(vector<vector<int>> dp) {
    int ans = 0;
    for (int i = dp.size() - 2; i >= 0; --i)
      for (int j = 1; j + 1 < dp[0].size(); ++j)
        if (dp[i][j] == 1) {
          dp[i][j] =
              min({dp[i + 1][j - 1], dp[i + 1][j], dp[i + 1][j + 1]}) + 1;
          ans += dp[i][j] - 1;
        }
    return ans;
  }
};

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/count-fertile-pyramids-in-a-land/
2092. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:16:47

```
class UF {
 public:
  UF(int n) : id(n) {
    iota(begin(id), end(id), 0);
  }

  void union_(int u, int v) {
    id[find(u)] = id[find(v)];
  }

  bool connected(int u, int v) {
    return find(u) == find(v);
  }

  void reset(int u) {
    id[u] = u;
  }

 private:
  vector<int> id;

  int find(int u) {
    return id[u] == u ? u : id[u] = find(id[u]);
  }
};

class Solution {
 public:
  vector<int> findAllPeople(int n, vector<vector<int>>& meetings,
                            int firstPerson) {
    vector<int> ans;
    UF uf(n);
    map<int, vector<pair<int, int>>> timeToPairs;

    uf.union_(0, firstPerson);

    for (const auto& m : meetings)
      timeToPairs[m[2]].push_back({m[0], m[1]});

    for (const auto& [_, pairs] : timeToPairs) {
      unordered_set<int> peopleUnioned;
      for (const auto& [x, y] : pairs) {
        uf.union_(x, y);
        peopleUnioned.insert(x);
        peopleUnioned.insert(y);
      }
      for (const int person : peopleUnioned)
        if (!uf.connected(person, 0))
          uf.reset(person);
    }

    for (int i = 0; i < n; ++i)
      if (uf.connected(i, 0))
        ans.push_back(i);

    return ans;
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/find-all-people-with-secret/
JavaScript Portfolio
Tags: javascript, webdev, gamedev, programming
Published: 2022-07-06 11:14:27

Hey everyone, I'm practicing JavaScript, and I'd like to share my project with you
If you could give me some feedback, I would greatly appreciate it

https://mohitbilala.github.io/piggame/
https://github.com/MOHITBILALA/piggame

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5l8gdyu1hohbhg9zp9yv.png)
 
 
Hopefully you will enjoy this game that I made myself
I Hope to work with this age
Tags: webdev, beginners, programming, javascript
Published: 2022-07-06 11:12:50

## Intro
Welcome, I am **Mahmoud Shalaby** from *egypt*. I'm still **15 years** old. I'm a full stack web developer with a lot of things.

## My front-end skills
HTML/CSS/JS - every one know this

**CSS framework:** I am using tailwind because I like it so much and it will be the best CSS framework in the future

**JavaScript framework:** I know *React* and *Vue* but I'm using **Svelte** because it's faster and easier then them but his community is still small but it's be larger by the time.

## My back-end skills
Python -> Django
JavaScript -> Express

**NOTE:** I can use *socket.io* in web sockets (Only with JavaScript)

## Another programming languages
Some Game developing with Unity and C#
More things in python (My best language)
I know C/C++

### Why did you choose **full stack web developing** ?
because I like it, I have a lot of skills in it and it was my first enter of programming

## The End
I am live in Egypt not in America or Germany to be easy to get a work
If you have any thing to help me tell me in comments
And tell me about my English level because it's not my mother language and I'm still leaning it
2102. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:10:48

```
struct Location {
  string name;
  int score;
  Location(const string& name, int score) : name(move(name)), score(score) {}
};

class SORTracker {
 public:
  void add(const string& name, int score) {
    l.emplace(name, score);
    if (l.size() > k + 1) {
      const Location location = l.top();
      l.pop();
      r.emplace(location.name, location.score);
    }
  }

  string get() {
    const string name = l.top().name;
    if (!r.empty()) {
      const Location location = r.top();
      r.pop();
      l.emplace(location.name, location.score);
    }
    ++k;
    return name;
  }

 private:
  struct CompareLeftMinHeap {
    bool operator()(const Location& a, const Location& b) {
      return a.score == b.score ? a.name < b.name : a.score > b.score;
    }
  };

  struct CompareRightMaxHeap {
    bool operator()(const Location& a, const Location& b) {
      return a.score == b.score ? a.name > b.name : a.score < b.score;
    }
  };

  priority_queue<Location, vector<Location>, CompareLeftMinHeap> l;
  priority_queue<Location, vector<Location>, CompareRightMaxHeap> r;
  int k = 0;
};

```
#leetcode
#challenge
here is the link for the problem:

https://leetcode.com/problems/sequentially-ordinal-rank-tracker/submissions/
2111. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:09:32

```
class Solution {
 public:
  int kIncreasing(vector<int>& arr, int k) {
    int ans = 0;

    for (int i = 0; i < k; ++i) {
      vector<int> A;
      for (int j = i; j < arr.size(); j += k)
        A.push_back(arr[j]);
      ans += numReplaced(A);
    }

    return ans;
  }

 private:
  int numReplaced(const vector<int>& A) {
    vector<int> tail;
    for (const int a : A)
      if (tail.empty() || tail.back() <= a)
        tail.push_back(a);
      else
        tail[firstGreater(tail, a)] = a;
    return A.size() - tail.size();
  }

  int firstGreater(const vector<int>& tail, int target) {
    return upper_bound(begin(tail), end(tail), target) - begin(tail);
  }
};

```
#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/minimum-operations-to-make-the-array-k-increasing/
2251. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:07:42

```
class Solution {
 public:
  vector<int> fullBloomFlowers(vector<vector<int>>& flowers,
                               vector<int>& persons) {
    vector<int> ans;
    vector<int> starts;
    vector<int> ends;

    for (const auto& f : flowers) {
      starts.push_back(f[0]);
      ends.push_back(f[1]);
    }

    sort(begin(starts), end(starts));
    sort(begin(ends), end(ends));

    for (const int p : persons) {
      const int started =
          upper_bound(begin(starts), end(starts), p) - begin(starts);
      const int ended = lower_bound(begin(ends), end(ends), p) - begin(ends);
      ans.push_back(started - ended);
    }

    return ans;
  }
};

```
#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/number-of-flowers-in-full-bloom/
Schemas (Structured Data) Snippets
Tags: schemas, structured
Published: 2022-07-06 04:47:08

# Schemas
<p><a href="https://schema.org/">Schema.org</a> is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond.</p>
<p>Founded by Google, Microsoft, Yahoo and Yandex, Schema.org vocabularies are developed by an open <a href="https://www.w3.org/community/schemaorg">community</a> process, using the public-schemaorg@w3.org mailing list and through <a href="https://schema.org/">GitHub</a>.</p>

# Demo
<p>Page demo: <a href="https://www.todaydeals.org/store/dunelm">Dunelm Coupon</a></p>
<p>Created by the team building <a href="https://www.todaydeals.org">todaydeals.org</a></p>


# Technical guidelines
<p>You can test compliance with technical guidelines using the <a href="https://search.google.com/test/rich-results">Rich Results Test</a> and the <a href="https://support.google.com/webmasters/answer/9012289">URL Inspection tool</a>, which catch most technical errors.</p>
<p><strong>Format</strong></p>
<p>In order to be eligible for rich results, mark up your site's pages using one of <a href="https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data#structured-data-format">three supported formats</a>:</p>
<ul>
<li>JSON-LD (recommended)</li>
<li>Microdata</li>
<li>RDFa</li>
</ul>
2246. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:06:37

```
class Solution {
 public:
  int longestPath(vector<int>& parent, string s) {
    const int n = parent.size();
    int ans = 1;
    vector<vector<int>> graph(n);

    for (int i = 1; i < n; ++i)
      graph[parent[i]].push_back(i);

    longestPathDownFrom(graph, 0, s, ans);
    return ans;
  }

 private:
  int longestPathDownFrom(const vector<vector<int>>& graph, int u,
                          const string& s, int& ans) {
    int max1 = 0;
    int max2 = 0;

    for (const int v : graph[u]) {
      const int res = longestPathDownFrom(graph, v, s, ans);
      if (s[u] == s[v])
        continue;
      if (res > max1) {
        max2 = max1;
        max1 = res;
      } else if (res > max2) {
        max2 = res;
      }
    }

    ans = max(ans, 1 + max1 + max2);
    return 1 + max1;
  }
};

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/longest-path-with-different-adjacent-characters/
2227. Leetcode Solution in CPP
Tags: cpp
Published: 2022-07-06 11:04:52

```
struct TrieNode {
  vector<TrieNode*> children;
  bool isWord = false;
  TrieNode() : children(26) {}
  ~TrieNode() {
    for (TrieNode* child : children)
      delete child;
  }
};

class Encrypter {
 public:
  Encrypter(vector<char>& keys, vector<string>& values,
            vector<string>& dictionary) {
    for (int i = 0; i < keys.size(); ++i) {
      const auto& key = keys[i];
      const auto& value = values[i];
      keyToValue[key] = value;
      valueToKeys[value].push_back(key);
    }
    for (const auto& word : dictionary)
      insert(word);
  }

  string encrypt(string word1) {
    string ans;
    for (const char c : word1)
      ans += keyToValue[c];
    return ans;
  }

  int decrypt(string word2) {
    return find(word2, 0, &root);
  }

 private:
  unordered_map<char, string> keyToValue;
  unordered_map<string, vector<char>> valueToKeys;
  TrieNode root;

  void insert(const string& word) {
    TrieNode* node = &root;
    for (const char c : word) {
      const int i = c - 'a';
      if (!node->children[i])
        node->children[i] = new TrieNode;
      node = node->children[i];
    }
    node->isWord = true;
  }

  int find(const string& word, int i, TrieNode* node) {
    const auto value = word.substr(i, 2);
    if (!valueToKeys.count(value))
      return 0;

    int ans = 0;
    if (i + 2 == word.length()) {
      for (const char key : valueToKeys[value]) {
        const auto& child = node->children[key - 'a'];
        ans += child && child->isWord;
      }
      return ans;
    }

    for (const char key : valueToKeys[value]) {
      if (!node->children[key - 'a'])
        continue;
      ans += find(word, i + 2, node->children[key - 'a']);
    }

    return ans;
  }
};

```


#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/encrypt-and-decrypt-strings/
2223. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:03:46

```
class Solution {
 public:
  long long sumScores(string s) {
    const int n = s.length();
    vector<int> z(n);
    // [l, r] := indices of the rightmost segment match
    int l = 0;
    int r = 0;

    for (int i = 1; i < n; ++i) {
      if (i <= r)
        z[i] = min(r - i + 1, z[i - l]);
      while (i + z[i] < n && s[z[i]] == s[i + z[i]])
        ++z[i];
      if (i + z[i] - 1 > r) {
        l = i;
        r = i + z[i] - 1;
      }
    }

    return accumulate(begin(z), end(z), 0LL) + n;
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/sum-of-scores-of-built-strings/
2290. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 11:02:33

```
class Solution {
 public:
  int minimumObstacles(vector<vector<int>>& grid) {
    const int m = grid.size();
    const int n = grid[0].size();
    const vector<int> dirs{0, 1, 0, -1, 0};
    using T = tuple<int, int, int>;  // (d, i, j)
    priority_queue<T, vector<T>, greater<>> minHeap;
    vector<vector<int>> dist(m, vector<int>(n, INT_MAX));

    minHeap.emplace(grid[0][0], 0, 0);
    dist[0][0] = grid[0][0];

    while (!minHeap.empty()) {
      const auto [d, i, j] = minHeap.top();
      minHeap.pop();
      if (i == m - 1 && j == n - 1)
        return d;
      for (int k = 0; k < 4; ++k) {
        const int x = i + dirs[k];
        const int y = j + dirs[k + 1];
        if (x < 0 || x == m || y < 0 || y == n)
          continue;
        const int newDist = d + grid[i][j];
        if (newDist < dist[x][y]) {
          dist[x][y] = newDist;
          minHeap.emplace(newDist, x, y);
        }
      }
    }

    return dist[m - 1][n - 1];
  }
};

```

#leetcode
#challenge
here is the link for the problem:
https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner/
What is End-to-End Testing?
Tags: testing, cicd, automation
Published: 2022-07-06 11:01:05

End-to-end testing, also known as E2E testing, is a methodology used for ensuring that applications behave as expected and that the flow of data is maintained for all kinds of user tasks and processes. This type of testing approach starts from the end user’s perspective and simulates a real-world scenario. For example, on a sign-up form, you can expect a user to perform one or more of these actions:

- Enter a blank email and password
- Enter a valid email and password
- Enter an invalid email and password
- Click a sign-up button

You can use end-to-end testing to verify that all these actions work as a user might expect.

End-to-end testing may sound comprehensive, but there are many other testing methods that you should use with it to create a robust continuous integration practice.

Read the full blog on [CircleCI](https://circleci.com/blog/what-is-end-to-end-testing/).

Thanks for reading 💜

---

I publish a [monthly newsletter](https://www.ravsam.in/newsletter/) in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I come across while surfing the web.

Connect with me through [Twitter](https://twitter.com/ravgeetdhillon) • [LinkedIn](https://linkedin.com/in/ravgeetdhillon) • [Github](https://github.com/ravgeetdhillon) or send me an [Email](mailto:ravgeetdhillon@gmail.com).

— [Ravgeet](https://www.ravgeet.in/), *Full Stack Developer and Technical Content Writer*
1847. Leetcode Solution in Java
Tags: java
Published: 2022-07-06 11:00:09

```
class Solution {
    public int[] closestRoom(int[][] rooms, int[][] queries) {
        int roomsCount = rooms.length;
        int queriesCount = queries.length;
        Arrays.sort(rooms, new Comparator<int[]>() {
            public int compare(int[] room1, int[] room2) {
                return room2[1] - room1[1];
            }
        });
        int[][] newQueries = new int[queriesCount][3];
        for (int i = 0; i < queriesCount; i++) {
            newQueries[i][0] = queries[i][0];
            newQueries[i][1] = queries[i][1];
            newQueries[i][2] = i;
        }
        Arrays.sort(newQueries, new Comparator<int[]>() {
            public int compare(int[] query1, int[] query2) {
                return query2[1] - query1[1];
            }
        });
        TreeSet<Integer> set = new TreeSet<Integer>();
        int roomIndex = 0;
        int[] answer = new int[queriesCount];
        for (int i = 0; i < queriesCount; i++) {
            int[] query = newQueries[i];
            int preferred = query[0], minSize = query[1], index = query[2];
            while (roomIndex < roomsCount && rooms[roomIndex][1] >= minSize) {
                set.add(rooms[roomIndex][0]);
                roomIndex++;
            }
            Integer floor = set.floor(preferred), ceiling = set.ceiling(preferred);
            if (floor == null && ceiling == null)
                answer[index] = -1;
            else if (floor == null)
                answer[index] = ceiling;
            else if (ceiling == null)
                answer[index] = floor;
            else {
                int difference1 = preferred - floor, difference2 = ceiling - preferred;
                if (difference1 <= difference2)
                    answer[index] = floor;
                else
                    answer[index] = ceiling;
            }
        }
        return answer;
    }
}
```


#leetcode
 #challenge
here is the link for the problem:
https://leetcode.com/problems/closest-room/
1835. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-06 10:58:31

```
class Solution {
 public:
  int getXORSum(vector<int>& arr1, vector<int>& arr2) {
    const int xors1 = accumulate(begin(arr1), end(arr1), 0, bit_xor<>());
    const int xors2 = accumulate(begin(arr2), end(arr2), 0, bit_xor<>());
    return xors1 & xors2;
  }
};

```


#leetcode #challenge
here is the link for the problem:
https://leetcode.com/problems/find-xor-sum-of-all-pairs-bitwise-and/