https://github.com/jaygajera17/leetcode_gfg_string_problem
Collection of all the String Question from gfg and leetcode
https://github.com/jaygajera17/leetcode_gfg_string_problem
cpp data-structures dsa geeksforgeeks geeksforgeeks-cpp geeksforgeeks-solutions geeksforgeeks-string gfg leetcode leetcode-string string string-algorithms string-question
Last synced: 3 months ago
JSON representation
Collection of all the String Question from gfg and leetcode
- Host: GitHub
- URL: https://github.com/jaygajera17/leetcode_gfg_string_problem
- Owner: jaygajera17
- Created: 2022-09-12T12:06:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T09:03:48.000Z (about 2 years ago)
- Last Synced: 2025-02-10T08:32:51.787Z (5 months ago)
- Topics: cpp, data-structures, dsa, geeksforgeeks, geeksforgeeks-cpp, geeksforgeeks-solutions, geeksforgeeks-string, gfg, leetcode, leetcode-string, string, string-algorithms, string-question
- Language: C++
- Homepage:
- Size: 68.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Change_The_String.cpp
Awesome Lists containing this project
README
# gfg_string_question
https://www.geeksforgeeks.org/top-50-string-coding-problems-for-interviews/## Importance
- playing with characters test logic of programmer very well
- understanding of C++ Standard Template Library(STL) also increase
- frequently asked string coding questions in every coding round## Key Points
### ascii value:-
- 48 to 57 - Number
- 65 to 90 - uppercase [(s[0]>='a'&&s[0]<='z']
- 97 to 122 - lowercase [(s[0]>='A'&&s[0]<='Z']
- lowercase = lowercase + 32### inbuilt Method:-
- toupper:- (char)tolower(s[i]);
- tolower:- (char)toupper(s[i]);Transform:-
- transform(s.begin(), s.end(), s.begin(), ::tolower);
- transform(s.begin(), s.end(), s.begin(), ::toupper);- Find:- s1.find(s2[i])!=string::npos:- it means is present
- token:- stringstream
ex:
string s = "geeks for geeks";
stringstream ss(s); // Used for breaking words
string word; // to store individual words
while (ss >> word)
cout << word << endl;
- next_permutation()