• Mar 12, 2026 •prakhar.dev101-263b
0 likes • 1 view
class Solution { public: bool isGoodLength(int len, string& s) { } string longestPalindrome(string s) { int l = 1; // a string of length 1 can always be a pallindrome int r = s.length() + 1; // it is impossible to find a string of length s.length() + 1, leave alone pallindromic while(r > l + 1) { int mid = l + (r - l) / 2; if(isGoodLength(mid, s)) { l = mid; } else { r = mid; } } } };
• Jan 10, 2025 •alexandr.zaikin.9999-c10d
0 likes • 2 views
import os
• Nov 18, 2022 •AustinLeath
0 likes • 0 views
# This is the network config written by 'subiquity' network: ethernets: enp0s3: dhcp4: yes nameservers: addresses: [8.8.8.8,8.8.4.4] version: 2
• Apr 14, 2021 •Daedalus
Eqtt vw wvm awtdm ug xchhtm?
• Aug 27, 2024 •vercetti322
0 likes • 6 views
#include <iostream> #include <vector> #include <algorithm> #include <cstdlib> #include <ctime> using namespace std; // Function to generate random numbers vector<int> generateRandomNumbers(int count, int minValue, int maxValue) { vector<int> numbers; for (int i = 0; i < count; ++i) { numbers.push_back(rand() % (maxValue - minValue + 1) + minValue); } return numbers; } // Function to print a vector of integers void printVector(const vector<int>& vec) { for (int num : vec) { cout << num << " "; } cout << endl; } // Function to sort and display numbers void sortAndDisplayNumbers(vector<int>& numbers) { sort(numbers.begin(), numbers.end()); cout << "Sorted numbers: "; printVector(numbers); } int main() { // Seed the random number generator srand(static_cast<unsigned int>(time(0))); int count, minValue, maxValue; cout << "Enter the number of random numbers to generate: "; cin >> count; cout << "Enter the minimum value: "; cin >> minValue; cout << "Enter the maximum value: "; cin >> maxValue; // Generate random numbers vector<int> numbers = generateRandomNumbers(count, minValue, maxValue); // Display unsorted numbers cout << "Unsorted numbers: "; printVector(numbers); // Sort and display sorted numbers sortAndDisplayNumbers(numbers); return 0; }
• Mar 14, 2025 •melikdev
0 likes • 3 views
console.log('hello world')