Upgrading Existing Applications to Scala 3.3.9 LTS
Learn how to upgrade an existing Scala application to Scala 3.3.9 LTS with sbt, validate dependencies and compiler plugins, and test the build before deployment.
Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
Learn how to upgrade an existing Scala application to Scala 3.3.9 LTS with sbt, validate dependencies and compiler plugins, and test the build before deployment.
Learn how to preview and migrate to OpenTelemetry Java agent 3.0 defaults, including semantic-convention changes for database metrics, attributes, and messaging traces.
Everything on Java, not only its articles: the Java page →
Learn how to identify breaking changes before updating Java libraries by reviewing APIs, release notes, Maven and Gradle dependency trees, and transitive dependencies.
Learn how to use jdeps to find internal JDK API, package, class, and module dependencies before upgrading a Java application.
Learn how to use Java Flight Recorder to capture a running JVM, identify monitor and thread-parking contention, and investigate performance bottlenecks.
Learn how to find the nth character in the infinite concatenation of positive integers using digit ranges and arithmetic, without generating the full string.
Learn to diagnose Java TLS handshake failures by inspecting certificate chains, truststores, expiry dates, hostname validation, and OpenSSL output.
Learn how to inspect OpenTelemetry Java agent settings, configuration precedence, service names, exporters, and environment variables to troubleshoot missing or unexpected traces.
Learn how to count array indices whose jump paths escape the array using Java DFS, state tracking, memoization, and cycle detection.
Learn how Selenium 4.51 removes Guava Function from ExpectedCondition and how to update Java Selenium wait helpers for compatibility.
Learn how JWT authentication works in Spring Boot with Spring Security, including login, token generation, JWT validation, roles, and protected REST API endpoints.
Learn how to calculate the minimum project completion time in Java using topological sorting, Kahn's algorithm, and dynamic programming to handle dependencies and detect cycles.
Learn how to solve the Minimum Edge Reversals for a Path problem using 0-1 BFS and a Deque. The article explains how to convert directed edges into weighted edges with costs 0 and 1, find the minimum number of reversals required to reach the destination, and implement the solution efficiently in Java with O(n + m) time complexity.
Given an even-sized integer array, divide the array into two equal halves. A pair (i, j) is considered a dominant pair if i belongs to the first half, j belongs to the second half, and arr[i] >= 5 × arr[j]. The goal is to count the total number of dominant pairs efficiently. A brute-force approach takes O(n²) time. By sorting both halves independently and using the two-pointer technique, we can solve the problem in O(n log n) time. This problem is a good example of how sorting can optimize pair-counting problems by avoiding unnecessary comparisons.
Find the maximum product that can be obtained by selecting exactly k elements from an integer array. The solution uses dynamic programming by maintaining both the maximum and minimum products for each subsequence size. Keeping both values is important because multiplying two negative numbers can produce a positive maximum product. The approach correctly handles positive numbers, negative numbers, zero, odd and even values of k, and all-negative arrays.
Learn how to solve the Word in Grid problem in Java using eight-directional traversal, direction arrays, boundary checks, duplicate handling, and O(n × m × k) complexity.
Learn how to solve the Bird and Max Fruit Gathering problem efficiently using the Sliding Window technique. In this problem, trees are arranged in a circle, and the bird can visit at most m consecutive trees to collect the maximum possible fruits.
Learn how to find the number from 1 to n with the maximum digit sum using a digit-based optimization approach, efficient candidate generation, and Java.
Learn how to find the K-th element of two sorted arrays in Java using binary search with O(log(min(n, m))) time and efficient partition-based searching.
Given an integer array, you can replace any number of elements with 1. The goal is to maximize the sum of absolute differences between consecutive elements. This article explains how to solve the problem efficiently using a two-state Dynamic Programming approach in O(n) time and O(1) auxiliary space. It includes the intuition, DP states, transitions, Java implementation, and a step-by-step dry run.
Learn how to solve the cafe computer allocation problem in Java using a three-state tracking approach to correctly count customers rejected when no computer is available.
Learn how to solve the "Triplets with Sum in Range" problem in Java with an optimal $O(n^2)$ time complexity and $O(1)$ auxiliary space using sorting and the two-pointer technique.
Learn how to solve the Secret Cipher problem efficiently using the KMP (Knuth-Morris-Pratt) prefix function / LPS array in Java. This article explains how repeated prefixes can be identified and compressed using *, how the algorithm constructs the lexicographically smallest encrypted string, and how to achieve O(n) time complexity for strings up to 105 characters.
Solve maze pathfinding with dynamic programming in Java. Calculate total paths (mod 10^9+7) and max adventure sum.
Efficiently find the largest odd-sized square with at most k ones in a binary matrix using 2D prefix sums and binary search.
Master dynamic programming to maximize tasks! Learn the optimal strategy for high vs. low effort tasks with O(n) time and O(1) space.
Solve the Friends Pairing Problem with dynamic programming in Java. Learn the recurrence relation and O(1) space optimization.
Find the minimum operations (increment by 1 or double all) to convert an all-zero array to a target array. Reverse thinking reveals the solution.
Learn to efficiently count pairs with a difference less than k in an array using Java. This optimized solution leverages sorting and the two-pointer technique for O(n log n) time complexity.
Learn an O(n) Java solution for finding the maximum-sum contiguous subarray with length at least K using Kadane's algorithm and a sliding window.
Write an article and earn +1,000 SHARP when it is approved.
Write an article