Rakesh Vardanrakeshvardan.com·7 hours agoReverse words in a sentenceProblem Statement: String input = "Hello World!"; String output = "World! Hello" Solution-1 public class Solution1 { public static void main(String[] args) { String sentence = "Hello World!"; System.out.println(reverseWords(sente...DiscussCoding PracticeJava
Sujon Howladersujon.hashnode.dev·Mar 24, 2024Mastering JavaScript Strings: Essential Tips and TricksIntroduction: JavaScript strings are fundamental building blocks in web development. Whether you're working on a simple webpage or a complex web application, understanding how to manipulate strings efficiently can significantly enhance your coding sk...Discussstring
Gulshan Kumarperfinsights.hashnode.dev·Mar 23, 2024Valid AnagramGiven two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. LeetCode Probl...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Mar 23, 2024Existence of a Substring in a String and Its ReverseGiven a string s, find any substring of length 2 which is also present in the reverse of s. Return true if such a substring exists, and false otherwise. LeetCode Problem - 3083 class Solution { // Method to check if a substring of length 2 is pre...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Mar 20, 2024Valid ParenthesesGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the cor...DiscussJava Solutionstring
Tural Suleymanidecodebytes.hashnode.dev·Mar 16, 2024String Vs StringBuilder In C#As we know, string class is for storing text type information in RAM. The information storage capacity of the string type variable is 2GB. That is, we can store information of any size (less than 2GB) in the RAM using a string. What is the disadvanta...DiscussC#
Abhinavgix.hashnode.dev·Mar 14, 2024Methods of String / JavascriptThe String is used to represent and manipulate a sequence of characters. Like these : const world = "This is a string."; There are several methods ( or Prototypes) available for manipulating and accessing strings in all over the code file. The list ...DiscussMethods of String
Gulshan Kumarperfinsights.hashnode.dev·Mar 12, 2024Custom Sort StringYou are given two strings order and s. All the characters of order are unique and were sorted in some custom order previously. Permute the characters of s so that they match the order that order was sorted. More specifically, if a character x occurs ...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Mar 12, 2024Make Three Strings EqualYou are given three strings s1, s2, and s3. You have to perform the following operation on these three strings as many times as you want. In one operation you can choose one of these three strings such that its length is at least 2 and delete the rig...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Mar 12, 2024Kth Distinct String in an ArrayA distinct string is a string that is present only once in an array. Given an array of strings arr, and an integer k, return the k<sup>th</sup> distinct string present in arr. If there are fewer than k distinct strings, return an empty string "". Not...DiscussJava SolutionJava