What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-15 01:00:03
java find all of letter in string
String stringName = "Hello"; String characterToFind = "l"; //This example will find all the Ls in this string and will print the index of //it as soon as it is detected for(int i = 0; i < stringName.length(); i++){ if(stringName.... Add solution -
Java 2022-03-12 21:15:23
java indexof all occurrences
String stringName = "Hello"; String characterToFind = "l"; //This example will find all the Ls in this string and will print the index of //it as soon as it is detected for(int i = 0; i < stringName.length(); i++){ if(stringName.... Add solution -
TypeScript 2022-03-12 01:40:01
PYTHON STACK FUNCTION count the valid number of brackets Returns the total number of valid brackets in the string
import sys def error(c, line_number, column_number): print 'Error: unmatched', c, 'line', line_number, 'column', column_number def check(stack, wanted, c, line_number, column_number): if stack[-1] != wanted: error(c, line_number, column_... Add solution -
Python 2022-03-12 00:40:07
python insert
# The insert() method inserts an element to the list # at a given index. # Syntax: list_name.insert(index, element) my_list = ["Add", "Answer"] my_list.insert(1, "Grepper") print (my_list) > ['Add', 'Grepper', 'Answer'] Add solution -
Java 2022-03-11 17:50:03
armstrong numbers problem java
// Java program to print all armstrong numbers between given range import java.util.Scanner; public class ArmstrongNumbersGivenRange { public static void main(String[] args) { int number, startNumber, endNumber, a, rem, n, count = 0; S... Add solution