Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/Hacktoberfest_Guide.md
Original file line number Diff line number Diff line change
@@ -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!
30 changes: 30 additions & 0 deletions removeZeros.java

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an extra file

Original file line number Diff line number Diff line change
@@ -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
}
}
Loading