题目描述
Given a string s, extract all the integers from s.
Example 1:
Input:
s = "1: Prakhar Agrawal, 2: Manish Kumar Rai,
3: Rishabh Gupta56"
Output: 1 2 3 56
Explanation:
1, 2, 3, 56 are the integers present in s.
Example 2:
Input:
s = "geeksforgeeks"
Output: No Integers
Explanation:
No integers present in the string.
Your Task:
You don't need to read input or print anything. Complete the function extractIntegerWords() which takes string s as input and returns a list of integers. If an empty list is returned the output is printed as "No Integers".
Expected Time Complexity: O(|s|).
Expected Auxiliary Space: O(|s|).
Constraints:
1<=|s|<=10^{5}
输入格式
见题面
输出格式
见题面
样例输入
s = "1:Prakhar Agrawal, 2:Manish Kumar Rai,
3:Rishabh Gupta56"
样例输出
1 2 3 56