Learn how to rotate an array by k rotations with brute force and more complex algorithms like reverse or cyclic replacements.
Also find me here:
Baeldung Author
Luca Cambi
I am a senior software developer with 10+ years of experience. I have been working on many projects using different programming languages but accomplished moslty with Java and Javascript. I have experience in Cloud technologies and containerization using Docker. I believe that the code I write has an impact and can help in people's daily lives. I focus mainly on open-source programming and love Linux. I have two beautiful kids and love to spend time with them. I love playing guitar, watching movies and traveling as much as possible in my free time.
Here's what I've written (so far):
Baeldung on Java
- All
- Java String (3)
- Algorithms (3)
- Testing (2)
- Java Array (2)
- JPA (2)
- Spring Boot (1)
- REST (1)
- Java Concurrency (1)
- Gradle (1)
- Data (1)
- Core Java (1)
Format Multiple ‘or’ Conditions in an If Statement in Java
Filed under Core Java
Learn how to improve the readability of multiple conditions in an if statement.
Returning a Value After Finishing Thread’s Job in Java
Filed under Java Concurrency
Learn how to return a value from a thread that has its job terminated
Difference Between JPA and Spring Data JPA
Filed under JPA
Learn how Spring Data JPA and JPA both work with some high-level overviews and code snippets.
Baeldung on Computer Science
- All
- Programming (2)
- Software Architecture (1)
- Core Concepts (1)
- Concurrency (1)
The Lost Update Problem in Concurrency Control
Filed under Concurrency
The lost update problem occurs when multiple operations attempt to modify the same resource simultaneously without proper concurrency control. That can lead to unhandled exceptions or data inconsistencies.
What Is a Relational Database?
Filed under Core Concepts
Learn about relational databases, their core concepts, main advantages, and comparisons with other database types.
Differences Between Faking, Mocking and Stubbing
Filed under Programming
Learn the differences between faking, mocking, and stubbing when using test implementations for software components.
System Design: Dependency Inversion Principle
Filed under Software Architecture
Learn about the Dependency Inversion Principle with examples and why we should use it.
Serialization vs. Marshaling
Filed under Programming
Learn how serialization and marshaling work and see their most common use cases.
Baeldung on Kotlin
- All
- Security (1)
- Kotlin Classes and Objects (1)
- Kotlin (1)
Kotlin Application Deployment With Docker and Kubernetes
Filed under Kotlin
Learn to deploy a simple Kotlin application to Kubernetes (K8s) using Docker and Docker Hub.
Spring Security JWT With Kotlin
Filed under Security
See a Spring Boot application example with tests to use JWT and secured endpoints.
Convert a Data Class to ByteBuffer in Kotlin
Filed under Kotlin Classes and Objects
Learn how to convert a Kotlin data class to a ByteBuffer using different forms of serialization
Baeldung on Ops
- All
- Kubernetes (2)
- Docker (2)
Docker Interactive Mode After Executing Script
Filed under Docker
Learn how to run a script inside a Docker container after its creation and access to a shell terminal
Difference Between kubectl apply and kubectl create
Filed under Kubernetes
Learn how the kubectl object management works with kubectl create and kubectl apply.
Getting Started With K3s
Filed under Kubernetes
Learn the main features of K3s and create a simple cluster as an example.
Communicating With Docker Containers on the Same Machine
Filed under Docker
Explore how two containers can connect on the same machine using Docker Compose
Baeldung on SQL
- All
- SQL Views (1)
Databases: Simple vs. Complex vs. Materialized Views
Filed under SQL Views
Learn how simple and complex SQL views differ from materialized views.