C++ typing practice
16 hand-curated C++ snippets — real code, real syntax. Build muscle memory for the patterns you actually write. No signup required.
general
algorithms, utilities, and idioms- sortvoid sortDescending(std::vector<int>& v) {
- uniqueptrstruct Node {
- lambdastd::vector<int> filterEvens(const std::vector<int>& v) {
- templatetemplate <typename T>
- raiiclass LockGuard {
- strmanipstd::string trim(const std::string& s) {
- hashmapstd::unordered_map<std::string, int> frequency(
- minstacktemplate <typename T>
leetcode
interview-prep problems and solutions- twosumstd::vector<int> twoSum(std::vector<int>& nums, int target) {
- reverseliststruct ListNode {
- validparensbool isValid(const std::string& s) {
- maxsubarrayint maxSubArray(std::vector<int>& nums) {
- climbstairsint climbStairs(int n) {
- binarysearchint search(const std::vector<int>& nums, int target) {
- palindromebool isPalindrome(const std::string& s) {
- mergeintervalsstd::vector<std::vector<int>> merge(std::vector<std::vector<int>>& intervals) {