Posts

Showing posts from December, 2025

Data structure and Algorithyms

Image
  Linked Lists A linked list consists of nodes with some sort of data, and a pointer, or link, to the next node. A big benefit with using linked lists is that nodes are stored wherever there is free space in memory, the nodes do not have to be stored contiguously right after each other like elements are stored in arrays. Another nice thing with linked lists is that when adding or removing nodes, the rest of the nodes in the list do not have to be shifted. Types of Linked Lists There are three basic forms of linked lists: Singly linked lists Doubly linked lists Circular linked lists A  singly linked list  is the simplest kind of linked lists. It takes up less space in memory because each node has only one address to the next node, like in the image below. A  doubly linked list  has nodes with addresses to both the previous and the next node, like in the image below, and therefore takes up more memory. But doubly linked lists are good if you want to be able to mov...

Optimal path

  You said: (Given two arrays A, B with N elements, find the max. element in the optimal path from top left to bottom right. 3 4 6 :A[] 5 1 4 :B[] 3->4->1->4 is the optimal path and max value is 4 in optimal path.) ChatGPT said: This is a  min–max path  problem on a  2 × N grid . Problem interpretation You are given two arrays  A  and  B , each of size  N . Think of them as a grid with: Top row =  A Bottom row =  B You start at  top-left  ( A[0] ) and must reach  bottom-right  ( B[N-1] ). Allowed moves: Move  right Move  down  (only once, from A to B) The  cost of a path  is the  maximum value on that path . Goal:  choose a path that minimizes this maximum value , then report that value. Example A = [ 3 , 4 , 6 ] B = [ 5 , 1 , 4 ] Possible paths (down at column  k ): Down at  k = 0 Path:  3 → 5 → 1 → 4 Max =  5 Down at  k = 1 Path:  3 → 4 → 1...

System design and architecture

  Geico System Design Interview: The Complete Guide Before diving into fintech-specific problems, it’s important to revisit the essential  System Design interview topics  that will come up. Scalability and Partitioning : Insurance systems must handle millions of concurrent requests (claims, policy lookups, payments). You’ll need to explain how to scale databases and services using  partitioning and sharding  strategies. Availability vs Consistency ( CAP Theorem ) : In fintech and insurance,  consistency often outweighs availability . Losing or duplicating a transaction is unacceptable. Be ready to explain trade-offs in scenarios like claims adjudication or payments. Load Balancing and Queues : High traffic services like  claims intake  require  load balancers  to distribute requests and  message queues  (Kafka, RabbitMQ) to decouple services. Caching for Performance : To reduce latency, you’ll often cache  frequently acces...