Gulshan Kumarperfinsights.hashnode.dev·Apr 16, 2024Binary Number with Alternating BitsGiven a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. LeetCode Problem - 693 class Solution { // Method to check if the binary representation of a number has alternating b...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Apr 16, 2024Minimum Remove to Make Valid ParenthesesGiven a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parentheses string is valid and return any valid string. Formally, a paren...DiscussJava SolutionJava
Gulshan Kumarperfinsights.hashnode.dev·Apr 16, 2024Make The String GreatGiven a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: 0 <= i <= s.length - 2 s[i] is a lower-case letter and s[i + 1] is the same letter but in upper-...DiscussJava SolutionJava
K Subramanyeshwaraksubramanyeshwara.hashnode.dev·Apr 8, 2024String it on: Mastering JavaScript Strings Methods...!A string is a sequence of characters. It contains zero or more characters within single (' '), double (" "), or backticks (``). Strings can contain letters, numbers, symbols, and special characters. We have studied strings in the previous blog. Let u...DiscussJavaScript
Gulshan Kumarperfinsights.hashnode.dev·Apr 6, 2024Find Common CharactersGiven a string array words, return an array of all characters that show up in all strings within the words (including duplicates). You may return the answer in any order. LeetCode Problem - 1002 class Solution { // Method to find common character...DiscussJava SolutionJava
Your Coding Palcodingpal.hashnode.dev·Apr 1, 20241/20 Beginner Projects in Python - Word ReplacementToday is the first day of starting 20 beginner projects series. In this one, we will learn about word replacement in Python. In this project, we will learn how to replace a word inside the string. We will use function for this project, so that we can...DiscussPython
Rakesh Vardanrakeshvardan.com·Mar 28, 2024[Java] Reverse words in a StringProblem Statement: https://leetcode.com/problems/reverse-words-in-a-string/ String input = "Hello World!"; String output = "World! Hello" Solution-1 import org.testng.annotations.Test; import java.util.Arrays; import static org.assertj.core.api.As...Discuss·41 readsCoding 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