This tutorial demonstrates how to find the number of contiguous subarrays with a given arithmetic mean in an array efficiently.
Also find me here:
Baeldung Author
Harpal Singh
A seasoned Software Engineer proficient in Java and web technologies, I craft scalable, high-performance solutions for complex business needs. With a passion for engineering and AI, I actively contribute to technical blogs. Let's connect to discuss how I can contribute to your team's success.
Here's what I've written (so far):
Baeldung on Java
- All
- Spring Boot (2)
- Algorithms (2)
- Spring Web (1)
- Spring Cloud (1)
- Reactive (1)
- Persistence (1)
- Networking (1)
- Java String (1)
- Java List (1)
- Java IO (1)
- Java Array (1)
- HTTP Client-Side (1)
- Data (1)
Replacing Strings in Java Using Regex: Back Reference vs. Lookaround
Filed under Java String
In this tutorial, we’ll explore how to use the replaceAll() method in the String class to replace text using regular expressions. We’ll compare the back reference and lookaround methods for this operation and evaluate their performance.
CompletableFuture vs. Mono
Filed under Reactive
In this quick tutorial, we’ll compare CompletableFuture and Mono from Project Reactor in Java, focusing on how they handle asynchronous tasks.
Get the Response Body in Spring Boot Filter
Filed under Spring Boot, Spring Web
Learn to retrieve the response body from a ServletResponse in a Spring Boot filter.
Calculate Distance Between Two Coordinates in Java
Filed under Algorithms
Learn three methods to calculate the distance between two geographical coordinates in Java.
Creating a Telegram Bot with Spring Boot
Filed under Spring Boot
Learn how to implement a Telegram bot using Spring Boot.
Lossy and Lossless Image Compression Using Java
Filed under Java IO
Learn how to compress images in Java using built-in libraries and Apache Commons Imaging. Image compression reduces file size without compromising visual quality. It optimizes image-heavy applications and websites for faster loading and better user experience.
Introduction to QuestDB
Filed under Persistence
A brief introduction to QuestDB, a column-oriented database designed for time-series and event data, and how to create, query and remove data.
Rate Limiting With Client IP in Spring Cloud Gateway
Filed under Spring Cloud
Learn how to limit the rate of incoming requests based on the client’s actual IP address for our Spring Cloud Gateway.
Baeldung on Computer Science
- All
- Core Concepts (1)
Practical Examples of the Big O Notation
Filed under Core Concepts
Explore several examples of different classes of the asymptotic complexity of algorithms.
Baeldung on Kotlin
- All
- Spring (1)
- Kotlin Server-Side (1)
- Algorithms (1)
Implementing a Simple Blockchain in Kotlin
Filed under Algorithms
A quick tutorial on implementing a basic blockchain in Kotlin.
CRUD API With Spring Boot And Kotlin
Filed under Kotlin Server-Side, Spring
This tutorial demonstrates building a CRUD API with Spring Boot and Kotlin for a task list.
Baeldung on SQL
- All
- SQL Queries (4)
- SQL Functions (2)
- SQL Operators (1)
- SQL Basics (1)
How to Remove Duplicate Rows in SQL
Filed under SQL Queries
A quick tutorial on removing duplicate rows in a SQL database.
Get the First Day of a Month in SQL
Filed under SQL Functions, SQL Queries
Learn how to calculate the first day of a month from a date field in SQL Server, PostgreSQL, and MySQL.
Set Default Values for Columns in SQL
Filed under SQL Basics
A quick tutorial on setting default values for columns in an SQL table.
Matching Multiple Patterns in Queries
Filed under SQL Operators, SQL Queries
Learn how to use the LIKE and IN operators to filter matches against more than one pattern in a column.
Preventing Division by Zero Errors in SQL
Filed under SQL Functions, SQL Queries
Learn some techniques for avoiding the divide-by-zero error when writing SQL queries.