Amazon Interview Question | LeetCode 58. Length of Last Word | Tamil | code io

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 40

  • @kirubakaran1547
    @kirubakaran1547 Год назад +4

    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

    • @codeio
      @codeio  Год назад +3

      Sorry brother .... Thanks for pointing it out 🤩🤩.... I'm pinning this comment for others to notice if you don't mind

    • @vasanthm-wq5rq
      @vasanthm-wq5rq Год назад +2

      Instead that last la iruka space ah traverse pani antha last char kita varalam aprm logic ah apply panlam

  • @santh11bala
    @santh11bala Год назад +1

    Bro antha data structure series waiting !!!!

    • @codeio
      @codeio  Год назад +2

      Varuthu bro 😅 ... neraya episode shoot panitom kandippa potruvom .... editing poguthu
      Sorry for the delay

  • @Md7riyazz
    @Md7riyazz Год назад

    Anna nama python ku panumbothu split function potu panna athuve list ahh transfer aaidum la

  • @2023_SoftwareDeveloper
    @2023_SoftwareDeveloper Год назад +5

    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????

    • @gokulnath589
      @gokulnath589 Год назад +1

      Yes surely

    • @naveenna3311
      @naveenna3311 Год назад +2

      Eppura

    • @codeio
      @codeio  Год назад +2

      Yess brother definitely.... neraya companies iruku neenga ena branch nu la kanduka matanga kandippa poiralam

    • @2023_SoftwareDeveloper
      @2023_SoftwareDeveloper Год назад +1

      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😂❤️

    • @codeio
      @codeio  Год назад +2

      Yes's absolutely

  • @sathiyas4285
    @sathiyas4285 Год назад

    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 ?

    • @codeio
      @codeio  Год назад +1

      Intha maari questions neraya iruku evlo nu limit ila ... programming padichitu matha time la ellam ithula concentrate pannunga

    • @sathiyas4285
      @sathiyas4285 Год назад

      @@codeio ok thanks ga

  • @johnkennedyf5595
    @johnkennedyf5595 Год назад

    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 🤩

    • @codeio
      @codeio  Год назад +1

      try panrom bro... DSA implementation java la than bro panrom

    • @johnkennedyf5595
      @johnkennedyf5595 Год назад

      @@codeio okay bro thank you 😊

  • @md_media1783
    @md_media1783 Год назад

    Bro how to get array of integer without knowing array size in c plz sollunga or code

    • @codeio
      @codeio  Год назад +1

      String ah vangitu integer array ah convert panlam 👍

    • @md_media1783
      @md_media1783 Год назад

      @@codeio vera ethum logic iruka bro

    • @codeio
      @codeio  Год назад +1

      Do while loop vachu ethachu oru char vantha stop panra mari panlam

    • @md_media1783
      @md_media1783 Год назад

      @@codeio ithu ku program kedaikuma bro

    • @codeio
      @codeio  Год назад +1

      Code io Telegram forum la kelunga bro anupuvanga namma friends

  • @-Corvo_Attano
    @-Corvo_Attano Год назад +1

    *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;
    }
    }

    • @sajinkumarp7769
      @sajinkumarp7769 Год назад +1

      and u have missed i-- in the second while loop, :)

    • @-Corvo_Attano
      @-Corvo_Attano Год назад

      @@sajinkumarp7769 ohh thanks 😅👍 changed

  • @varsharavichanthiran9839
    @varsharavichanthiran9839 Год назад

    After completing B. Sc computer science... I have intrest for higher study.. Which is best M. Sc CS Or MCA for it industry

    • @codeio
      @codeio  Год назад

      Sorry itha pathi idea ila unga seniors yarachu iruntha avangata kekurathu better

    • @varsharavichanthiran9839
      @varsharavichanthiran9839 Год назад

      @@codeio ok bro👍

  • @manik1547
    @manik1547 Год назад

    Data structures ep 3 bro

    • @codeio
      @codeio  Год назад +1

      Editing poguthu brother vanthurum this week

  • @RakeshKumar-ni2vd
    @RakeshKumar-ni2vd Год назад

    Bro unka voice low ah iruku atha matum knjm increase panrinkala

    • @codeio
      @codeio  Год назад +1

      Sorry brother kandipa seri panirom ... thanks for telling 👍

  • @monickaruthrakumaran4826
    @monickaruthrakumaran4826 Год назад +1

    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();
    }
    }

  • @--MohamedAdhilNHJ
    @--MohamedAdhilNHJ Год назад +2

    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

    • @Md7riyazz
      @Md7riyazz Год назад +1

      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