preetikaprakash.hashnode.devHide API key in JavascriptBelow 6 steps are for hiding the API key in Vanilla JavaScript code. No framework is used here. If you wan’t to hide your API key from the browser, follow the below steps to successfully hide it from being used by anyone else. Step 1 : Create a new j...Mar 15, 2025·1 min read
preetikaprakash.hashnode.devDSA Day 95/100Topic: Strings 1) Reverse Words in StringMedium Input: s = "a good example" Output: "example good a" Explanation: You need to reduce multiple spaces between two words to a single space in the reversed string. public String reverseWords(String s) ...Sep 21, 2023·1 min read
preetikaprakash.hashnode.devDSA Day 94/100Topic: Strings 1) Length of last wordEasy Input: s = " fly me to the moon " Output: 4 Explanation: The last word is "moon" with length 4. public class lengthoflastword { public static int lengthOfLastWord(String s) { Stri...Sep 19, 2023·1 min read
preetikaprakash.hashnode.devDSA Day 93/100Topic: Arrays 1) Remove Duplicates from Sorted ArrayEasy2) Remove Duplicates from Sorted Array IIMedium Remove Duplicates from Sorted Array Input: nums = [0,0,1,1,1,2,2,3,3,4] Output: 5, nums = [0,1,2,3,4,_,_,_,_,_] Explanation: Your function shou...Sep 18, 2023·2 min read
preetikaprakash.hashnode.devDSA Day 92/100Topic: Arrays 1) Remove ElementEasy Input: nums = [0,1,2,2,3,0,4,2], val = 2 Output: 5, nums = [0,1,4,0,3,_,_,_] Explanation: Your function should return k = 5, with the first five elements of nums containing 0, 0, 1, 3, and 4. Note that the five el...Sep 17, 2023·1 min read