
C++ → Leet Code Solutions - 003 - Longest Substring Without Repeating Characters
cpp, LeetCode, C++, C++17, string
Solution "Longest Substring Without Repeating Characters" on Leet Code
class Solution { public: int lengthOfLongestSubstring(string s) { string candidate_str = ""; string checking_str = ""; size_t position = std::string::npos; for (auto& ch : s) { position = checking_str.find(ch); if (position …
Python → Не получается одновременно удалить все символы из текста + пробелы, и нужно, чтобы регистр букв автоматом менялся на нижний.
import string abc = string.ascii_lowercase symb = string.punctuation #Переменные со всеми буквами нижнего регистра #И вторая - со всеми символами def is_palindrome(text): return text == text[::-1] something = input("Type some text ") s1="".join(c for c in something if c.isalpha()) #Попы…

Python 3 → How to Remove the last word from string in Python

Ruby → User Guide #07 - Ruby - Back to the simple examples
руководство пользователя, ruby lesson, Ruby, ruby уроки, user guide, regular expressions, string
Now let's take apart the code of some of our previous example programs.
The following appeared in the simple examples chapter.
def fact(n) if n == 0 1 else n * fact(n-1) end end print fact(ARGV[0].to_i), "\n"
Because this is …
Fornex
Let me recommend you a great European Fornex hosting.
Fornex has proven itself to be a stable host over the years.
For Django projects I recommend VPS hosting
Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN
View Hosting