Jubair Ahmedjubairshaik.hashnode.dev·Jul 11, 2024How to Reverse Only Letters and Vowels in a String Using C++using namespace std; #include <iostream> #include <algorithm> #include <vector> string reverseOnlyLetters(string s) { int low = 0; int high = s.size() - 1; while (low < high) { if (isalpha(s[low]) && isalpha(s[high])) ...Discuss·1 likecode
SHAIK JUBER AHMEDjubairdev.hashnode.dev·Jul 10, 2024Binary Search and Linear Search: Understanding the BasicsLinear search is not the most optimal search algorithm for large datasets, but it is straightforward and works well for small arrays or unsorted data. ! using namespace std; #include <iostream> // linear search int LinearSearch(int arr[], int size...Discusscpp
Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 8, 2024Josephus AlgorithmProblem Link Click Here Approaches Approach 1 (Brute force) we will create one array/vector to store the values from 1 to n, representing the sequence of each person As given in the question we will remove one person from the array and move forward...Discussjosephus algoritm
Anto Jebikshanantojebikshan.hashnode.dev·Jul 7, 2024Getting Started with Competitive Programming: A Guide for BeginnersIntroduction: Competitive programming is an exciting and rewarding activity that challenges your problem-solving skills and enhances your coding abilities. Whether you're a beginner looking to improve your programming skills or aiming to participate ...Discuss·12 likes·36 readsProgramming Blogs
Anower Hossainanower77.hashnode.dev·Jul 7, 2024Recursion & Backtracking1-Recursion-Basic #include "bits/stdc++.h" using namespace std; void solve(int n) { if(n==0) return; solve(n-1); cout<< n << " "; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; solve(n); ...Discuss2-Tree-Recursion
Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 7, 2024Water bottle Problem (Leetcode POTD)Problem Link Click Here Approach We need to calculate the maximum number of full water bottles we can consume right so let's consider one test case Total filled bottled = 15, Exchange Rate = 4 So initially we will consume 15 bottles now these bott...Discussleetcode
暮秋geez.hashnode.dev·Jul 7, 2024ArchLinux编译muduo网络库最近在学习完了unix网络编程了解到了muduo网络库,打算使用muduo写一个项目练手。但苦于一直编译muduo网络库编译不成功,这里总结以下我在编译过程中遇到的问题。我使用的是ArchLinux,其他发行版应该也能参考。 编译时cpp版本过低 具体错误见下: /usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported." 79 | #...Discussmuduo
Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 5, 2024Slow and Fast AlgorithmThe Use-Case This algorithm is used in various cases and concepts when it comes to linked list, some use cases are as follows For finding the mid of the linked list in O(n) complexity. To Detect the loop in the linked list now let's discuss it's ...Discusslinked list
Ujjwal Sharmaujjwalsharma.hashnode.dev·Jul 4, 2024Moore's Voting AlgorithmWorking Let the initial length be 1, because we are considering the first element as the initial element in our count. Move forward in the array and if the same element appears again, then increase the count by 1; if not, then decrease the count by...DiscussProgramming Blogs
Ethanethan91.hashnode.dev·Jun 26, 2024FeaturedStreaming Camera with C++ WebRTC GStreamerIntroduction Hello! 😎 In this advanced WebRTC tutorial I will show you how to stream your camera to a HTML page using WebRTC, GStreamer and C++. We will be using boost to handle the signaling. By the end of this tutorial you should have a simple und...Raaj Aryan and 1 other are discussing this2 people are discussing thisDiscuss·24 likes·128 readsWebRTC