- LeetCode 34 – Find First and Last Position of Element in Sorted Array
Plain binary search finds an occurrence; this wants the first and the last, and expanding outwards from a hit is O(n) the moment the array is all one value. The clean answer is one primitive — lower bound — called twice, with target + 1 giving the second answer. Why the window is half-open, and why removing the equality test removes the bugs.
- Oracle Database – With Spring Boot
Driver, URL, and the colon-versus-slash that decides between a SID and a service name. A tuned Hikari and JPA configuration, a Lombok entity that does not break hashCode, the allocationSize mismatch that causes ORA-00001 under load, batching, calling PL/SQL packages, Testcontainers against real Oracle, and a table of the errors you will hit.
- Oracle Database – Transactions and Locking
Why readers never block writers, and how undo delivers both rollback and read consistency. Where a transaction starts, the DDL that commits behind your back, the two isolation levels Oracle actually has and the ORA-08177 retry that SERIALIZABLE requires. SELECT FOR UPDATE SKIP LOCKED as a work queue, deadlocks, and finding the blocker.
- Oracle Database – Indexes and Execution Plans
Tuning Oracle is one skill: get the real plan and compare estimated rows against actual rows. Index types and the composite leading-column rule, the four reasons your index is ignored — including implicit conversion and the NULLs a B-tree does not store — DBMS_XPLAN with GATHER_PLAN_STATISTICS, bind variables, and invisible indexes.
- Oracle Database – PL/SQL
Anonymous blocks, %TYPE and %ROWTYPE, the two exceptions SELECT INTO can raise, cursor FOR loops, and packages as the unit of organisation. Exception handling done properly, why WHEN OTHERS THEN NULL is the worst line of code in the Oracle world, BULK COLLECT and FORALL with SAVE EXCEPTIONS — and when to write plain SQL instead.