Sirisha Challagirisirishachallagiri.hashnode.dev·9 hours ago1160. Find Words That Can Be Formed by CharactersYou are given an array of strings words and a string chars. A string is good if it can be formed by characters from chars (each character can only be used once). Return the sum of lengths of all good strings in words. Example 1: Input: words = ["cat"...Discuss·2 likesCode With Sirileetcode
Sirisha Challagirisirishachallagiri.hashnode.dev·Dec 1, 2023125. Valid PalindromeA phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers. Given a string s, re...Discuss·2 likesCode With Sirileetcode
Sirisha Challagirisirishachallagiri.hashnode.dev·Nov 28, 20231704. Determine if String Halves Are AlikeYou are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second half. Two strings are alike if they have the same number of vowels ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', '...Discuss·2 likesCode With Sirileetcode
Sirisha Challagirisirishachallagiri.hashnode.dev·Nov 26, 20232000. Reverse Prefix of WordProblem Link: https://leetcode.com/problems/reverse-prefix-of-word/description/ Given a 0-indexed string word and a character ch, reverse the segment of word that starts at index 0 and ends at the index of the first occurrence of ch (inclusive). If t...Discuss·2 likesCode With Sirileetcode
Sudarshan Doiphodesudarshandoiphode.hashnode.dev·Nov 24, 2023"isBlank() vs. isEmpty() – Which One Should You Choose?"Introduction If you are a Java developer, then definitely you have used String class and its methods in your career. But some of you might have also used one of the isBlank or isEmpty methods and some of you always get confused about choosing one of ...Discuss·72 readsString class in java
Gulshan Kumarperfinsights.hashnode.dev·Nov 23, 2023Reverse the stringQ - You are given a string s. You need to reverse the string. GeekForGeeks Problem - Link | Click Here class Reverse { // Method to reverse a given string public static String reverseWord(String str) { // Get the length of the input s...DiscussJava SolutionJava
Sirisha Challagirisirishachallagiri.hashnode.dev·Nov 17, 2023Longest Common PrefixThe longest common prefix is a problem in that we can find the prefix in every string of the array. str = [ "flower", "flow", "fight" ] output: fl (every string in the array contains the "fl" as its prefix. public class LogestCommonPrefix { public ...DiscussCode With SiriJava
Sawan Badhwarsawan1367.hashnode.dev·Nov 14, 2023Day 15 of DSA ChallengeRise and Shine. One more day playing with recursion. I tried solving two new problems that I found out. However, I wasn't able to solve the second one. But still, I got this one down. In this case, I was asked to remove the middle element of the stac...DiscussStacks
Gulshan Kumarperfinsights.hashnode.dev·Nov 11, 2023Java program: Get character before indexWrite a Java program to get the character (Unicode code point) before the specified index within the string. public class demo { public static void main(String[] args) { String str = "GulshanKumar"; int givenIndex = 4; i...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Nov 11, 2023Find upper and lower case from string.Write a Java program to find the upper and lower case from string and print count. import java.util.*; import static java.lang.System.in; public class demo { public static void main(String[] args) { String str = "Gulshan Kumar"; ...DiscussJava SolutionJava