Reverse words in a String Leetcode problem number 151 JAVA interview programming playlist: • Interview Programming ... #java #interviewquestions #leetcode
Пікірлер: 28
@rajdeeppatil36233 күн бұрын
such a sweet and simple solution, thank q mam.
@inspiremusicandinspirephar5228 Жыл бұрын
hats off to your dediication towards your work and professionalism
@TechnosageLearning Жыл бұрын
Thankyou!!💐
@anshumankumarnathshahdev3090 Жыл бұрын
thanks for the beautiful explanation . also your voice was very pleasent to my ears .
@thulasiramans63386 ай бұрын
Your's teaching is excellant mam. Put more videos mam. And I humbly request to give time complexity for the each problem
@godwinmensah123011 ай бұрын
Fantastic
@naveennaidu48559 ай бұрын
How can we write without split function
@vikasvarshney168126 күн бұрын
Good explanation.!!
@Raja-py2lb Жыл бұрын
Keep teaching mam😊
@vivekmalviya30362 ай бұрын
Thank u mam
@VinaySangem3 ай бұрын
mam ,plz maintain git link to store all codes
@ka2385311 ай бұрын
Love your explanation ❤
@shashiprakash-a2539 Жыл бұрын
Nice 👍👍👍👍 ma'am 🥰 you
@VinaySangem3 ай бұрын
mam why we are using + for s.split(" ");
@kishnersuperbannumiyer73833 ай бұрын
+ means any number of spaces ko break krna
@Jai_Jai_shri_Ram108 Жыл бұрын
In this question given space complexity: o(1)
@amritabill3306 Жыл бұрын
Hello, The problem says, "if string data type is mutable in your language, can you solve it in place with O(1) extra space" Since here the problem is solved using JAVA, where the Strings are immutable in nature.
@Jai_Jai_shri_Ram108 Жыл бұрын
@@amritabill3306 ok
@kandukuriveeranikhil732810 ай бұрын
Mam while executing the same we are getting errors mam ( : , s,regex , its showing as illegal expressions ) and while we are taking the inputs from user also we are facing the issue
@TechnosageLearning10 ай бұрын
Hi Can you please copy the code from git repo and give it a try..you might be missing something while writing regex
@rjsuryavanshi9223 ай бұрын
no need to write regex as it is automatically done by ide in intelliJ
@mohdarshad94274 ай бұрын
stack can be a better
@ashokkumar-nb8ri3 ай бұрын
Hi, I am trying to do reverse the words which is separated by dot. Here is an example and code String inp = " Welcome.to.Java.Programming "; static String reverseWords(String str) { String rev =""; str = str.trim(); String[] words = str.split("\\."); StringBuilder sb = new StringBuilder(); for (int i = words.length -1 ; i >= 0; i--) { sb.append(words[i]); sb.append("."); } return sb.toString().trim(); } Output: Programming.Java.to.Welcome. I could see dots are getting added for each iteration which makes the incorrect output. Could you please check and suggest me how to handle the situation
@chetankumar51903 ай бұрын
you are appending dots that's why they are appearing sb.append(".")
@ashokkumar-nb8ri3 ай бұрын
@@chetankumar5190 yes I am appending the dot, because input string is with dot. So I want to reverse the words and append the dots too. Like how they append the space in this video But my question is when appending its appending after last word also Check out the output in my comment
@chetankumar51903 ай бұрын
More what, u want dot or not
@ashokkumar-nb8ri3 ай бұрын
@@chetankumar5190 I am expecting below output Programming.Java.to.Welcome