We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

33
1.821.903,00

Cart

Quantity 20,00
Quantity 29.430,00

Tag: an

C++ : Check if a String starts with an another given String

In this article we will discuss both case sensitive and insensitive implementations to check if a string starts with an another given string. In c++, std::string class does not provides any startsWith() function to check if a string starts with an another given string. Let’s see how to do that using std::string::find and Boost Library. Advertisements …

C++ : Check if a String starts with an another given StringRead More

Different ways to Erase / Delete an element from a Set in C++

In this article we will discuss different ways to remove an element from Set. std::set provides 3 overloaded version of erase() member function. We will discuss them one by one. Advertisements Suppose we have a set of strings i.e. //Set Of Strings std::set<std::string> setOfStrs = {“Hi”, “Hello”, “is”, “the”, “at”, “Hi”, “is”, “from”, “that”}; Let’s …

Different ways to Erase / Delete an element from a Set in C++Read More

C++ : How to check if a String Ends With an another given String

In this article we will discuss both case sensitive and insensitive implementations to check if a string ends with an another given string. In previous article we discussed different implementations of startsWith() function for std::string. Here on similar lines we will discuss different implementations of endsWith() function. Advertisements In c++, std::string class does not provides any …

C++ : How to check if a String Ends With an another given StringRead More

C++ : How to check if a Set contains an element | set::find vs set::count?

In this article we will discuss how to check if a given element exists in set or not. Suppose we have a set of strings i.e. Advertisements // Set of strings std::set<std::string> setOfStrs = { “the”, “is”, “of” , “from” , “at” , “hello” , “the” }; Now we wnat to check if any given …

C++ : How to check if a Set contains an element | set::find vs set::count?Read More

Java : How to update the value of an existing key in HashMap | put() vs replace()

In this article we will discuss different ways to update the value of an existing key in HashMap in Java. Suppose we have a HashMap of words and their frequency count i.e. Advertisements // Create a Map of words and their frequency count HashMap<String, Integer> mapOfWords = new HashMap<String, Integer>() { { put(“John”, 25); put(“at”, …

Java : How to update the value of an existing key in HashMap | put() vs replace()Read More

Python : How to Check if an item exists in list ? | Search by Value or Condition

In this article we will discuss different ways to check if a given element exists in list or not. Table of Contents Introduction Check if element exists in list using python “in” Operator Check if element exist in list using list.count() function Check if element exist in list based on custom logic Introduction Suppose we …

Python : How to Check if an item exists in list ? | Search by Value or ConditionRead More

Python : How to add an element in list ? | append() vs extend()

In this article we will discuss how to add element in an existing list using different techniques. Adding item in list using list.append() list.append(item) It adds the item at the end of list. Advertisements For example, we have a list of string i.e. # List of string wordList = [‘hi’, ‘hello’, ‘this’, ‘that’, ‘is’, ‘of’] …

Python : How to add an element in list ? | append() vs extend()Read More

Python : How to Insert an element at specific index in List ?

In this article we will discuss how to insert an element in list at specific position. Inserting an element in list at specific index using list.insert() In python list provides a member function insert() i.e. Advertisements list.insert(position, element) It accepts a position and an element and inserts the element at given position in the list. …

Python : How to Insert an element at specific index in List ?Read More

33
1.821.903,00

Cart

Quantity 20,00
Quantity 29.430,00