leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE | |
commit | 8e90c7167cf7a35b951a20f10d79758a99ea39a3 |
parent | ff690b3d271ab3c8e131cca2e1f22de8fb7d205d |
author | Dimitrije Dobrota <mail@dimitrijedobrota.com> |
date | Wed, 11 Sep 2024 21:53:10 +0200 |
Daily Problem
Diffstat:A | Problems/2220.cpp | | | ++++ |
M | README.md | | | + |
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Problems/2220.cpp b/Problems/2220.cpp
@@ -0,0 +1,4 @@
class Solution {
public:
int minBitFlips(int start, int goal) const { return popcount((unsigned)(start ^ goal)); }
};
diff --git a/README.md b/README.md
@@ -1127,6 +1127,7 @@ for solving problems.
| 2212 | Medium | [Maximum Points in an Archery Competition](Problems/2212.cpp) |
| 2215 | Easy | [Find the Difference of Two Arrays](Problems/2215.cpp) |
| 2218 | Hard | [Maximum Value of K Coins From Piles](Problems/2218.cpp) |
| 2220 | Easy | [Minimum Bit Flips to Convert Number](Problems/2220.cpp) |
| 2221 | Medium | [Find Triangular Sum of an Array](Problems/2221.cpp) |
| 2222 | Medium | [Number of Ways to Select Buildings](Problems/2222.cpp) |
| 2225 | Medium | [Find Players With Zero or One Losses](Problems/2225.cpp) |