commit f40a78147065563d15bdb917138da9e0f46861f1
parent 409f8f231fe19d4ba2fc459321b3a042aade320c
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date: Fri, 18 Oct 2024 15:03:00 +0200
1 Random Problem
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Problems/0405.cpp b/Problems/0405.cpp
@@ -0,0 +1,8 @@
+class Solution {
+ public:
+ string toHex(int num) const {
+ std::stringstream ss;
+ ss << std::hex << num;
+ return ss.str();
+ }
+};
diff --git a/README.md b/README.md
@@ -317,6 +317,7 @@ for solving problems.
| 0402 | Medium | [Remove K Digits](Problems/0402.cpp) |
| 0403 | Hard | [Frog Jump](Problems/0403.cpp) |
| 0404 | Easy | [Sum of Left Leaves](Problems/0404.cpp) |
+| 0405 | Easy | [Convert a Number to Hexadecimal](Problems/0405.cpp) |
| 0406 | Medium | [Queue Reconstruction by Height](Problems/0406.cpp) |
| 0409 | Easy | [Longest Palindrome](Problems/0409.cpp) |
| 0412 | Easy | [Fizz Buzz](Problems/0412.cpp) |