- Introduction To Spring Data JPA
Hi and welcome to my Spring Data JPA tutorial. This tutorial is not for a beginner programmer. If you are new to programming and you want to learn about database checkout my SQL tutorial. If you are new to programming and you want to learn how code is connected and managing database data check out…
- Postgres – Joins
INNER, LEFT, RIGHT, FULL and CROSS, each with the row count it produces on real tables so the difference is visible rather than described. The LEFT JOIN whose WHERE clause silently turns it back into an INNER JOIN, anti-joins with NOT EXISTS, self-joins, and LATERAL — the one that lets you write top-N-per-group without a window function.
- Max Subset Sum No Adjacent
Write a function that takes in an array of positive integers and returns the maximum sum of non-adjacent elements in the array. If the input array is empty, the function should return 0. Sample input [75, 105, 120, 75, 90, 135] Sample output 330 = 75 + 120 + 135 Solution Time Complexity: O(n) Space…
- Minimal Waiting Time
You’re given a non-empty array of positive integers representing the amounts of time that specific queries take to execute. Only one query can be executed at a time, but the queries can be executed in any order. A query’s waiting time is defined as the amount of time that it must wait before its…
- Nth Fibonacci
The Fibonacci sequence is defined as follows: the first number of the sequence is 0, the second number is 1, and the nth number is the sum of the (n – 1)th and (n – 2)th numbers. Write a function that takes in an integer n and returns the nth Fibonacci number. I have a […]