SKSarthak Kulkarniincombustrrr.hashnode.dev·Dec 1, 2024 · 2 min readSolving the 'Amazing Subarrays' Problem in JavaProblem: Count substrings starting with a vowel in a given string, modulo 10003. Solution: public class Solution { public int solve(String A) { int count = 0; char vowels[] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}; ...00
SKSarthak Kulkarniincombustrrr.hashnode.dev·Dec 1, 2024 · 2 min readSolving String Permutation Problems in JavaQuestion: Given two strings A and B, check if they can be rearranged to match (i.e., check if they are permutations of each other). Solution: import java.util.Arrays; public class Solution { public int permuteStrings(String A, String B) { ...00
SKSarthak Kulkarniincombustrrr.hashnode.dev·Dec 1, 2024 · 2 min readLearning Input Methods in CChallenge: You need to read and print a character, a word (string), and a sentence (with spaces) in C. Each input type must be handled correctly and output in the required format. Solution: #include <stdio.h> int main() { // Declare variables fo...00Z