58. Length of Last Word || Java || Leetcode || Hindi

preview_player
Показать описание
58. Length of Last Word || Java || Leetcode || Hindi

DSA through Java-Leetcode Questions Playlist:

TCS Coding Question and Solution Playlist:

Programs in C Language Playlist:

Programs in Java Playlist:

Join Telegram Group for Notes, Quiz, Placement opportunities and more:
Рекомендации по теме
Комментарии
Автор

class Solution {
public int lengthOfLastWord(String s) {
String[] word = s.split(" ");
int length = word.length;
String LastWord = word[length-1];
int lenLW = LastWord.length();
return lenLW;
}
}
Its easier this way..

MillionDollarKnowledge-un