- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 34494 Articles for Programming
![Utkarsha Nathani](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
3K+ Views
Python provides variety of libraries one of them is SQLAlchemy, it provides an Object Relational Mapping (ORM) system for working with databases, including PostgreSQL. It is used for the purpose of storing and managing huge amount of structured data by the developers. By connecting both of them we can create a more productive and efficient database. In this article, we will learn how to connect PostgreSQL with SQLAlchemy in Python. What is SQLAlchemy? It is a powerful library that helps in simplifying the process of working with the databases, and is widely used in web development and data analysis. ... Read More
![Utkarsha Nathani](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
4K+ Views
What is PyMySQL? It is a python library which is used for connecting MySQL database. It is completely written in Python and uses python for communicating with MySQL server. Compatible with Python 2.7 and python 3.x, and provides a simple and instinctive interface for connecting to the MySQL database, executing SQL queries and for retrieving results. Why PyMySQL? It does not require any additional software, it is easy to use, provides security that is it supports SSL connections for secure communication, hence it is a popular choice for building Python applications that require database connectivity. What is MySQL MySQL ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
120 Views
Minimum removals required such that a given string consists only of a pair of alternating characters is a common problem in computer science and is encountered frequently in applications involving string manipulation. In this tutorial, we will solve this problem using the C++ programming language. We will begin by explaining the problem statement in detail and discussing its importance in various real-world applications. Then, we will provide a step-by-step algorithm to solve this problem and demonstrate its implementation in C++. Finally, we will conclude with some insights into the time and space complexity of our solution ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
122 Views
The minimum number of replacements done of the substring “01” with “110” to remove it completely is a common problem in string manipulation and optimization. In this tutorial, we delve into this problem and present an efficient solution using C++. The problem entails finding the minimum number of replacements required to transform a binary string by replacing all occurrences of the substring "01" with "110" while ensuring that the resulting string does not contain the substring "10". We provide a detailed explanation of the problem statement, present an algorithmic approach to solve it, and offer a ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
139 Views
Finding the minimum distance between duplicates in a string is a frequently encountered problem in computer science. It involves finding the smallest distance between any two identical characters in a given string. For example, in the string "minimum distance, " the minimum distance between the two 'i's is two, as they occur at positions 1 and 3, respectively. This problem can be solved using different programming languages, including C++. In this tutorial, we will learn a C++ algorithm with implementation to efficiently solve this problem. So let's get into this and learn something new and exciting! Problem ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
157 Views
The maximum score possible by removing substrings made up of a single distinct character is a well-known problem in the field of computer science and algorithm design. The problem statement involves finding the optimal solution to remove all the contiguous substrings from a binary string that contains only one type of character and score points for every removed substring of length K, where K can vary for each substring. This problem has various real-life applications, including text analysis and compression. In this tutorial, we will provide a solution to this problem using C++, and explain the logic behind ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
103 Views
Maximizing time by replacing ‘_’ in a given 24-hour format time is a problem that involves calculating the maximum possible time by replacing the missing digits in a given time in a 24-hour format. The task is to find the maximum time possible by replacing the characters ‘’ with any digit. In this tutorial, we will discuss how to solve this problem using the C++ programming language. We will provide a step-by-step explanation of the algorithm used to calculate the maximum possible time, along with the C++ code to implement the algorithm. Additionally, we will include test examples ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
93 Views
Lexicographically Kth-smallest string having ‘a’ X times and ‘b’ Y times is a problem where we need to find the Kth smallest string that contains X number of ‘a’s and Y number of ‘b’s. The strings are arranged lexicographically which means that the smallest string comes first when we sort all the possible strings. In this tutorial, we will discuss how to solve this problem using C++. We will start by understanding the problem statement in detail, followed by the algorithmic approach. We will then move on to implementing the solution in C++ using dynamic programming. The code ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
69 Views
Flip the String by either swapping given characters or rotating it horizontally for Q queries is a fascinating problem that involves manipulating a string based on a series of queries. In this tutorial, we delve into this problem and provide a solution using C++. The problem statement revolves around a string of characters and a set of queries, each containing instructions to swap specific characters or perform a horizontal rotation. Our objective is to determine the final configuration of the string after applying all the queries. Through this tutorial, we will explore the intricacies of the ... Read More
![Aishwarya Mani Tripathi](https://www.tutorialspoint.com/assets/profiles/640680/profile/60_625820-1681724381.jpeg)
108 Views
The task of flipping 0s in a binary string while considering their adjacent characters has practical applications in various domains. In this tutorial, we delve into the problem of modifying a given binary string by repeatedly flipping the 0s that have different adjacent characters. Specifically, we aim to solve this problem within the context of C++ programming. The solution involves iteratively scanning the string and applying the necessary flips based on the provided logic. By leveraging the string manipulation capabilities, we can efficiently transform the binary string by flipping 0s K times, ensuring that each flip adheres to the ... Read More