Sum of numbers in string | Geeksforgeeks | String Problems solutions | #Bloopers #programming

preview_player
Показать описание
This is the video under the series of DATA STRUCTURE & ALGORITHM. We are going to solve Questions from GeeksforGeeks Sum of numbers in a string.
Given string str containing alphanumeric characters, calculate the sum of all numbers present in the string.

Which is a very famous and Routine question asked in the Interview. The question is from the Topics Data structure. A full easy concept in Hindi. This is Question is asked in Many companies like Google, Amazon, Oyo Rooms, Paytm, Samsung, Adobe, etc...
We also Provide courses on Competitive Programming and Data structure. Please see our Full Playlist on our Channel.

----------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------

*Follow me *
----------------------------------------------------------------------------------------

►Our Playlists on:-

------------------------------------------------------------------------
Our Students Contacts Form:-
------------------------------------------------------------------------
#leetcode #geeksforgeeks #programming
Рекомендации по теме
Комментарии
Автор

I love ur teaching style, video bhut AXA lg gya aur aapka behaviour bhi to comment bhi kr diya ❤️❤️

polytechnicgssudhransh
Автор

Can u find even mumber only from alphanumeric and print those number

mangalpardeshi
Автор

I have to find sum of digits of a number but the number of digits in the number is 5*10^5, how to solve it.

NikhilSharma-kjxe
Автор

Wish you can explain this in English. Why did you do -0?

jennincekara
Автор

I still dont understand why we have subtracted '0' from s[i].

rajatsingh
Автор

Bhai ka video dekh aisi feeling aayi ki seedha "Kota Factory" series se uth ke aaye hai. Bahut accha laga apka video!

navneet
Автор

input = ABC
output =6
plz write this program

Prathmesh.mhatre.
Автор

why we have done
(s[i]-'0') at line no. 13 ?
Anyone please explain

rohitkumar_
Автор

the exact question was asked in TCS digital hiring

LearnCodeHS
Автор

great but couldn't get why we did str[i] and then - '0'

anirbanpal
Автор

That's what I want bro coding question😊

surjeetsingh-cphn
Автор

Good explanation, thanks to clear my doubt

chandankrraj
Автор

Heart ❤️ patient had happiness at 1:05 for mere 2 seconds 😆😂

rohitpol
Автор

Bhaiya stri -0 kis liye Kara h agar stri hi karte to ans wrong kyu hota h

gauravkumar
Автор

Write a program to find out the sum of digits of a given number .
For any non numeric character use it's ASCII value .
Input 67443a
Output 121
Plz iska code bta dijiye

shivanijaiswal
Автор

Bhai aap bina matlb ke video lamba krte ho..

priyanshuprajapati
Автор

//Time complexity : O(N)
//Space Complexity : O(1)
int sum=0;
for(int i=0;i<str.size();i++){
int num=0;
while(str[i]>='0' && str[i]<='9'){
num=num*10+str[i]-'0';
i++;
}
sum+=num;

}

return sum;

crjohnChan
join shbcf.ru