From 2801bd740cd35f8f8433d7cb925faf157fd07306 Mon Sep 17 00:00:00 2001 From: Gummalla Jashnavi <2400032492@kluniversity.in> Date: Fri, 7 Nov 2025 19:12:58 +0530 Subject: [PATCH 1/2] Added Java solution - Remove Zeros from Number --- removeZeros.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 removeZeros.java diff --git a/removeZeros.java b/removeZeros.java new file mode 100644 index 00000000..14382596 --- /dev/null +++ b/removeZeros.java @@ -0,0 +1,30 @@ +/* +LeetCode Problem: Remove Zeros from a Number +-------------------------------------------- +Description: +Given a number n, remove all the zeros from it and return the resulting number. + +Example: +Input: n = 102030 +Output: 123 + +Approach: +Convert the number to a string, remove all '0' characters using String.replace(), +and parse the result back to a long. + +Time Complexity: O(d), where d is the number of digits. +Space Complexity: O(d) +*/ + +class Solution { + public long removeZeros(long n) { + String str = String.valueOf(n); + String res = str.replace("0", ""); + return Long.parseLong(res); + } + + public static void main(String[] args) { + Solution s = new Solution(); + System.out.println(s.removeZeros(102030)); // Output: 123 + } +} From 76b5ec632cf123faa45c36a2728f043c5adc96e6 Mon Sep 17 00:00:00 2001 From: Gummalla Jashnavi <2400032492@kluniversity.in> Date: Wed, 12 Nov 2025 22:00:27 +0530 Subject: [PATCH 2/2] docs: add Hacktoberfest documentation contribution guide --- docs/Hacktoberfest_Guide.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/Hacktoberfest_Guide.md diff --git a/docs/Hacktoberfest_Guide.md b/docs/Hacktoberfest_Guide.md new file mode 100644 index 00000000..39caabb6 --- /dev/null +++ b/docs/Hacktoberfest_Guide.md @@ -0,0 +1,19 @@ +# Hacktoberfest Documentation Contribution Guide + +👋 Welcome contributors! +This repository focuses on **documentation-only** contributions. + +## ✅ What You Can Contribute +- Fix typos or grammar in README files +- Add short explanations to existing documentation +- Improve formatting (headings, code blocks, etc.) +- Add contribution tips for beginners + +## 🚀 How to Contribute +1. Fork this repository +2. Create a new branch: `docs/update-readme` +3. Make your changes +4. Open a Pull Request with the title: + **"docs: improve documentation clarity"** + +Thank you for contributing to open-source documentation!