Broo....I have solved 1840+ probs in GfG....I know java basics oops and Threadning.....C basics and pointers....C++ and Python Basics....Mysql Basics and...Html css a Basics....Also done some Localhost pages Using HTMl Css......DSA and collections Going on broo.......I have 4 projects in java with Mysql db....About 1000+ lines of code for each project.....They are all in Github broo...But i have non it backround.......Can i get into IT as a developer bro????
totally addicted broo.....i spend abt 10hrs of each day for coding just becozz of interest....if i will be a dev then i will do this with revenue brooo😂❤️
Hi broo...Neenga Striver DSA sheet ah daily one problem solve panna nalla irrukum bro..future la pannuveengala bro? Aparam DSA C++ la implementation iruntha nalla irrukum bro...Unga teaching super bro 🤩
s = input() count = 0 for i in range(-1,-(len(s)+1),-1): if s[i] != ' ': count = count + 1 elif count > 0 and s[i] == ' ': break print(count) this is an efficient python code and the input is not changed
sentence = input("Enter a long sentence: ") words = sentence.split() last_word = words[-1] length = len(last_word) print("The length of the final word is:", length) 5 line code is enough bro
HI do not modify the input data. it may use any other places of software.
if you are attending faang interviews it is a major mistake
Sorry brother .... Thanks for pointing it out 🤩🤩.... I'm pinning this comment for others to notice if you don't mind
Instead that last la iruka space ah traverse pani antha last char kita varalam aprm logic ah apply panlam
Bro antha data structure series waiting !!!!
Varuthu bro 😅 ... neraya episode shoot panitom kandippa potruvom .... editing poguthu
Sorry for the delay
Anna nama python ku panumbothu split function potu panna athuve list ahh transfer aaidum la
Broo....I have solved 1840+ probs in GfG....I know java basics oops and Threadning.....C basics and pointers....C++ and Python Basics....Mysql Basics and...Html css a Basics....Also done some Localhost pages Using HTMl Css......DSA and collections Going on broo.......I have 4 projects in java with Mysql db....About 1000+ lines of code for each project.....They are all in Github broo...But i have non it backround.......Can i get into IT as a developer bro????
Yes surely
Eppura
Yess brother definitely.... neraya companies iruku neenga ena branch nu la kanduka matanga kandippa poiralam
totally addicted broo.....i spend abt 10hrs of each day for coding just becozz of interest....if i will be a dev then i will do this with revenue brooo😂❤️
Yes's absolutely
Super ga. Oru doubt hr interview question in c and c++ la what is recursion in c. What is midlevel entha maari evlo questions padikanum ?
Intha maari questions neraya iruku evlo nu limit ila ... programming padichitu matha time la ellam ithula concentrate pannunga
@@codeio ok thanks ga
Hi broo...Neenga Striver DSA sheet ah daily one problem solve panna nalla irrukum bro..future la pannuveengala bro? Aparam DSA C++ la implementation iruntha nalla irrukum bro...Unga teaching super bro 🤩
try panrom bro... DSA implementation java la than bro panrom
@@codeio okay bro thank you 😊
Bro how to get array of integer without knowing array size in c plz sollunga or code
String ah vangitu integer array ah convert panlam 👍
@@codeio vera ethum logic iruka bro
Do while loop vachu ethachu oru char vantha stop panra mari panlam
@@codeio ithu ku program kedaikuma bro
Code io Telegram forum la kelunga bro anupuvanga namma friends
*JAVA SOLUTION*
class Solution {
public int lengthOfLastWord(String s) {
int len = 0, i = s.length()-1;
while(s.charAt(i) == ' ') i--;
while(i >= 0 && s.charAt(i--) != ' ' ; i--) len++;
return len;
}
}
and u have missed i-- in the second while loop, :)
@@sajinkumarp7769 ohh thanks 😅👍 changed
After completing B. Sc computer science... I have intrest for higher study.. Which is best M. Sc CS Or MCA for it industry
Sorry itha pathi idea ila unga seniors yarachu iruntha avangata kekurathu better
@@codeio ok bro👍
Data structures ep 3 bro
Editing poguthu brother vanthurum this week
Bro unka voice low ah iruku atha matum knjm increase panrinkala
Sorry brother kandipa seri panirom ... thanks for telling 👍
Alternate Solution:
import java.util.Arrays;
public class StringLastWorldLength {
public static void main(String args[]) {
StringExample stringExample = new StringExample();
System.out.println("Last word length : "+ stringExample.findLen());
}
}
class StringExample{
int findLen(){
String inputString = "StringExample stringExample = new StringExample(); ";
String checkStr = inputString.stripTrailing();
String[] lastStrArr = checkStr.split(" ");
String lastStr = lastStrArr[lastStrArr.length-1];
return lastStr.length();
}
}
s = input()
count = 0
for i in range(-1,-(len(s)+1),-1):
if s[i] != ' ':
count = count + 1
elif count > 0 and s[i] == ' ':
break
print(count)
this is an efficient python code and the input is not changed
sentence = input("Enter a long sentence: ")
words = sentence.split()
last_word = words[-1]
length = len(last_word)
print("The length of the final word is:", length)
5 line code is enough bro