You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ title: Welcome to CodeHarborHub Tutorials
4
4
sidebar_label: Welcome to CodeHarborHub
5
5
sidebar_position: 1
6
6
slug: /
7
+
sidebar_class_name: "tutorial-learning-tasks"
7
8
---
8
9
9
10
Hello, and welcome to CodeHarborHub! Our mission is to provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals. Whether you're looking to kickstart your career in web development, master a new programming language, or stay updated on the latest tech trends, we've got you covered.
{property: "og:title",content: "CodeHarborHub - A place to learn and grow"},
100
-
{property: "og:description",content: "CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals."},
content: "CodeHarborHub - A place to learn and grow",
100
+
},
101
+
{
102
+
property: "og:description",
103
+
content:
104
+
"CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals.",
Copy file name to clipboardExpand all lines: dsa-solutions/gfg-solutions/Basic/0093.md
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
-
id: replace-zeros-with-fives
2
+
id: replace-zeros-with-five
3
3
title: Replace All 0's with 5
4
4
sidebar_label: 0093 Replace All 0's with 5
5
5
tags:
6
-
- Python
7
-
- Java
8
-
- C++
9
-
- C
6
+
- Python
7
+
- Java
8
+
- C++
9
+
- C
10
10
description: "This document covers methods to replace all occurrences of the digit 0 with the digit 5 in a given number in various programming languages."
11
11
---
12
12
@@ -15,7 +15,9 @@ description: "This document covers methods to replace all occurrences of the dig
15
15
Given a number N. The task is to complete the function **convertFive()** which replaces all zeros in the number with 5 and returns the number.
16
16
17
17
### Examples:
18
+
18
19
**Example 1:**
20
+
19
21
```
20
22
Input
21
23
2
@@ -50,7 +52,9 @@ Since this is a functional problem you don't have to worry about input, you just
50
52
- $1 <= N <= 10^4$
51
53
52
54
## Solution
55
+
53
56
### Python
57
+
54
58
```python
55
59
defconvertFive(self,n):
56
60
num_str =str(n)
@@ -64,6 +68,7 @@ def convertFive(self,n):
64
68
```
65
69
66
70
### Java
71
+
67
72
```java
68
73
publicstaticint convertFive(int n){
69
74
String numStr =String.valueOf(n);
@@ -72,7 +77,7 @@ public static int convertFive(int n){
72
77
char currentChar = numStr.charAt(i);
73
78
if (currentChar =='0') {
74
79
result.append('5');
75
-
}
80
+
}
76
81
else {
77
82
result.append(currentChar);
78
83
}
@@ -83,6 +88,7 @@ public static int convertFive(int n){
0 commit comments