We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: Value

How to remove elements from a List based on value or External Criterion

In this article we will discuss how to remove an element from a List by matching a value or by matching some criterion. std::list provides two member functions for removing elements based on value i.e. std::list::remove and std::list::remove_if. Advertisements Using std::list::remove to remove element by value void remove (const value_type& val); It removes all the elements …

How to remove elements from a List based on value or External CriterionRead More

C++ Map: Erase by Value or Callback while iterating | erase_if for map

In this article we will discuss two different ways to erase elements from map i.e. In previous article we discussed how to erase elements by key and iterator using member function std::map::erase. But there is no default function to delete elements by value instead of key or delete elements based on callback. Advertisements We will …

C++ Map: Erase by Value or Callback while iterating | erase_if for mapRead 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

Java: How to get all keys by a value in HashMap ? | Search by Value in Map

In this article we will discuss how to search into a Map by value and fetch associated keys to the given value. Suppose we have a map of string and integers i.e. Advertisements HashMap<String, Integer> mapOfWords = new HashMap<String, Integer>() { { put(“John”, 25); put(“at”, 2); put(“from”, 10); put(“is”, 5); put(“the”, 2); put(“hello”, 1); put(“break”, …

Java: How to get all keys by a value in HashMap ? | Search by Value in MapRead 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 remove element from a list by value or Index | remove() vs pop() vs del

In this article we will discuss different ways to remove an elements from list. Remove an element from List by value using list.remove() Python’s list provides a member function to remove an element from list i.e. Advertisements list.remove(value) It removes the first occurrence of given element from the list. For example, Frequently Asked: Convert a …

Python : How to remove element from a list by value or Index | remove() vs pop() vs delRead More

Cart

Your Cart is Empty

Back To Shop