We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: single

Reverse a Singly Linked List in a Single Iteration

Linked List

Suppose we have a linked list and we want to reverse it in Single iteration and O(n) complexity. Original Linked List, Linked List Reversed Linked List, Advertisements Reversed Linked List Our Node structure is, struct node {     int value;     node * nextPtr;         node(int val)     {         value = val; …

Reverse a Singly Linked List in a Single IterationRead More

Python : How to replace single or multiple characters in a string ?

In this article we will discuss how to replace single or multiple characters in a string in Python. Python provides a str.replace() function i.e. Advertisements str.replace(old, new , count) It returns a new string object that is a copy of existing string with replaced content. Also, If count is not provides then it will return …

Python : How to replace single or multiple characters in a string ?Read More

Python: How to unzip a file | Extract Single, multiple or all files from a ZIP archive

In this article we will discuss different ways to unzip or extract single, multiple or all files from zip archive to current or different directory. In Python’s zipfile module, ZipFile class provides a member function to extract all the contents from a ZIP archive, Advertisements ZipFile.extractall(path=None, members=None, pwd=None) It accepts following arguments : path : …

Python: How to unzip a file | Extract Single, multiple or all files from a ZIP archiveRead More

Count occurrences of a single or multiple characters in string and find their index positions

In this article we will discuss different ways to count occurrences of a single character or some selected characters in a string and find their index positions in the string. Count Occurrences of a single character in a String using string.count() In Python the String class contains a method to count to the occurrences of …

Count occurrences of a single or multiple characters in string and find their index positionsRead More

Pandas : Change data type of single or multiple columns of Dataframe in Python

In this article we will discuss how to change the data type of a single column or multiple columns of a Dataframe in Python. Change Data Type of a Single Column To change the data type of a single column in dataframe, we are going to use a function series.astype(). Let’s first discuss about this …

Pandas : Change data type of single or multiple columns of Dataframe in PythonRead More

How to get multiple counts in single MySQL query

This article will be taking an example table customer_data and will try to get multiple counts from this table within a single query. Topics covered: COUNT(*) GROUP BY COUNT(DISTINCT) BASED ON CONDITION Let us get started by creating the table customer_data and inserting the data into it. CREATE TABLE customer_data ( customer_id INT , customer_name VARCHAR(255), customer_address VARCHAR(255), customer_level …

How to get multiple counts in single MySQL queryRead More

Javascript: Replace multiple spaces with a single space

A lot of standard requirements are there in javascript related to the processing of strings. One such generic requirement is to replace multiple spaces with a single space in a javascript string. This article will discuss and demonstrate how to remove duplicate spaces using various example illustrations. Table of Contents:- Replace multiple spaces with a …

Javascript: Replace multiple spaces with a single spaceRead More

DROP multiple columns in MySQL with single ALTER statement

This article will see how to DROP multiple columns from a MySQL table with a single ALTER statement. Multiple columns can be deleted from the MySQL table using a single ALTER statement by separating the DROP keyword and column name list with a comma. SYNTAX:- ALTER TABLE table_name DROP column1, DROP column2, DROP column3……..; EXAMPLE:- Advertisements Let …

DROP multiple columns in MySQL with single ALTER statementRead More

Cart

Your Cart is Empty

Back To Shop