We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Separate the Numbers
- Discussions
Separate the Numbers
Separate the Numbers
Sort by
recency
|
656 Discussions
|
Please Login in order to post a comment
Java solution in my code:
C# code
JAVA Solution:
Key point : 1 st number will be greater than 1 from starting number, 2 nd number will be greater than 2 from starting number and so on .
public static void separateNumbers(String s) { if (s.length() == 1) System.out.println("NO"); else {
Here is my easy C++ solution, explanation here : https://youtu.be/e32U19k1X6A
Solution in Kotlin: