Implement Atoi | GFG POTD | 5 Minutes Code | GeeksForGeeks | DSA

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

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

  • @5minutescode
    @5minutescode  4 дня назад

    Please subscribe to the channel and like the video. It will motivate me a lot. ❤❤

  • @dakshrana7786
    @dakshrana7786 3 дня назад

    thankyou so much you were a big help

  • @5minutescode
    @5minutescode  4 дня назад +2

    Java code -
    class Solution {
    public int myAtoi(String s) {
    // Your code here
    int sign = 1, res=0, i = 0;
    s=s.trim();
    if(i 7))
    return sign==-1 ? Integer.MIN_VALUE : Integer.MAX_VALUE;
    res=res*10+newNum;
    i++;
    }
    return res*sign;
    }
    }

  • @don-x7k
    @don-x7k 4 дня назад

    please explain it in hindi too

    • @5minutescode
      @5minutescode  3 дня назад

      sure.
      Any part which you didn't get ?