Skip to content

techtrendings.com

Let's explore

Menu
Menu

Author: Avidlearner

Program to find unpaired element in an Array in C++|Leetcode |techtrendings

Posted on February 20, 2022February 20, 2022 by Avidlearner

A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A such that: A[0] = 9 A[1] =… Continue reading

Program to Rotate an Array in C++|LeetCode |techtrendings

Posted on February 20, 2022February 20, 2022 by Avidlearner

An array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7]… Continue reading

Custom Deleters in C++

Posted on January 28, 2022January 28, 2022 by Avidlearner

In this tutorial, we will learn how to create a custom deleted to delete a smart pointer in C++. Introduction to Custom Deleter in C++ When a smart pointer of any user-defined type is destroyed, the destructor of the class is invoked giving us the ability to explicitly inspect and modify the delete process. But… Continue reading

Copy Constructor vs Assignment Operator in C++

Posted on January 23, 2022January 23, 2022 by Avidlearner

The Assignment Operator is when you replace the data with an already existing(previously initialized) object withsome other object’s data. Lets see an example: You can see here I call the assignment operator when I already initialized the Assign object. Then later I assign foo2 tofoo . All the changes to appear when you call that… Continue reading

marsexploration in C++ Hackerank

Posted on January 21, 2022January 21, 2022 by Avidlearner

A space explorer’s ship crashed on Mars! They send a series of SOS messages to Earth for help. Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string, , determine how many letters of the SOS message have been changed by radiation.… Continue reading

Caesar Cipher Problem C++ HackerRank

Posted on January 18, 2022January 18, 2022 by Avidlearner

Julius Caesar protected his confidential information by encrypting it using a cipher. Caesar’s cipher shifts each letter by a number of letters. If the shift takes you past the end of the alphabet, just rotate back to the front of the alphabet. In the case of a rotation by 3, w, x, y and z… Continue reading

Super Reduced String in C++

Posted on January 16, 2022January 16, 2022 by Avidlearner

Reduce a string of lowercase characters in range ascii[‘a’..’z’]by doing a series of operations. In each operation, select a pair of adjacent letters that match, and delete them. Delete as many characters as possible using this method and return the resulting string. If the final string is empty, return Empty String Example. aab shortens to b in one operation: remove… Continue reading

Print Odd and Even in Separate thread – C++ Multithreading

Posted on January 14, 2022January 14, 2022 by Avidlearner

In this article we will discuss about the how to print odd and even number in separate threads. Let’s see We can also use condition and notify with threads to print odd and even in separate threads.

getline Concept in C++

Posted on January 12, 2022January 12, 2022 by Avidlearner

getline() in C++ is a special convenience function provided by string class for reading line by line. This function reads all characters, including leading whitespaces, until the line delimiter orend-of-file is reached. The line delimiter is extracted but not appended. By default, the line delimiter is the newline character, but you can pass your own… Continue reading

decltype Keyword C++

Posted on January 10, 2022April 6, 2022 by Avidlearner

The decltype keyword takes an expression as argument, and computes the type of that expression,as shown here:int x = 123;decltype(x) y = 456; In this example, the compiler deduces the type of y to be int because that is the type of x.The difference between auto and decltype is that decltype does not strip reference… Continue reading

Posts navigation

  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next

Recent Posts

  • Implement Trie Data Structure in C++- LeetCode
  • How TLS Works
  • C++ – Factory Design Pattern – Creation Design Pattern
  • C++ – Strategy Design Pattern – Behavioral Design Pattern
  • LFU Cache Implementation – LeetCode

Recent Comments

  • automatically like friends photos on instagram on Program to find unpaired element in an Array in C++|Leetcode |techtrendings
  • Twicsy on Program to find unpaired element in an Array in C++|Leetcode |techtrendings

Archives

  • January 2023
  • November 2022
  • August 2022
  • June 2022
  • May 2022
  • March 2022
  • February 2022
  • January 2022

Categories

  • Algorithm
  • Algorithm
  • C++
  • Design Patterns
  • Multithreading
  • OS Concepts
  • Programming
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Join Our Mailing List for the Latest News and Updates.

© 2023 techtrendings.com | Powered by Superbs Personal Blog theme