# Amazon SDE I / AUTA APJ — R3/R4 fragment: intro, speak, GenAI, Java Notes for Adarsh Vishwakarma. Job **10454435**, ADCI Karnataka, Java Live Code. R1 happened **13 Aug 2026**. R2 happened **18 Aug 2026**. This file is for **Round 3 and Round 4** (HM / Bar Raiser / GenAI Fluency when scheduled — R3 is not always BR). These are answers to prompts **other** SDE I / UTA / AUTA candidates reported. Your loop may differ. Unnamed stays unnamed. Job **10454435** still has **no** public IE that names a live-round question — this is not a prediction. Inventory: [`Question-Research-BIBLE.md`](../../Question-Research-BIBLE.md) §5.E / §5.F. Worked DSA cards: [`Answer-BIBLE.md`](../../Answer-BIBLE.md). GiftedBooks answers = **resume only** (GitHub README currently describes AegisAI — mismatch). InstaRecon if they open GitHub: security-awareness demo, consent, no production attacks — then StratifyLabs / Argus / Ylogx / IQVIA. Login Tracker (`new_login` / `get_oldest_login`) is **unverified** — do not volunteer it. **Java vs production (say once):** Live Code is Java. IQVIA / Ylogx RAG shipped Python FastAPI; NestJS / React on Ylogx; ROS2 on Horizon; Argus YOLOv9 in Python. Same ideas (`HashMap`, heap, graph of nodes); different syntax. Do not pretend Spring Boot ran LangGraph. --- ## 0. How to use this fragment in a 60-min R3/R4 A later live in other India SDE I loops is often **10–20 min LP or resume**, then **the rest of the hour** as DSA, a small LLD, or a slot *titled* GenAI Fluency. Rank A UTA two-tech generally **did not** name GenAI-primary or OS/DB/CN in the first two lives. Your third live can still be any of those. Do not walk in with a ten-minute RAG lecture. Open with the intro in §1 if they ask “tell me about yourself / current role.” If they paste a coding prompt, **code first**. **OA is not a round.** If an IE numbered OA as “Round 1,” their “Round 3” is often the analogue of **your already-done R2**, not this slot. Your R3 is a **third live**. **Fluency-titled slots can be DSA.** LC 7623949 labeled **Gen AI Fluency** and asked nodes at **Distance K**, **O(n)**, **no parent mapping** — same constraint as AUTA LC 7406809 R2. One sentence (“this is a tree walk, not RAG”), then the Dist-K card in Answer-BIBLE. Do not start LangGraph until they ask after the tree. **Same-slot mix:** LC 7850431 GenAI **plus** dynamic k-th largest. LC 7724048 LLMs **plus** Next Greater. LC 8014509 GenAI **plus** LCA **plus** process-scheduler LLD. Context-switch. Do not finish a Fluency essay while the editor is empty. **60-min coding shape if they give a problem:** restate → approach (brute then optimal) → TC/SC out loud → Java → dry run on their example → one edge. If the editor does not compile, the dry run is the run. If stuck: brute that is correct, name the optimal DS, implement the hot loop. **Do not volunteer:** Login Tracker (unverified), Rate Limiter as if it were UTA-default (independent SDE I count = **1**, OA+3 system design), Qdrant, Haar-cascade “we tried first,” a missed ERC, AegisAI as GiftedBooks, Kafka as a Ylogx bullet, phishing/InstaRecon internals. Scan this file for intro, Fluency speak, and Java traps. Full DSA / LP STAR / project matrix live in other fragments and Answer-BIBLE. --- ## 1. Self-introduction Shape, not word-perfect. Pause after the name. **I**, not we. Current role first. Stop and let them pick a slice. If they already heard IQVIA in R1/R2, shorten the Deep Research paragraph and spend the seconds on Ylogx numbers or why Amazon. ### 90-second spoken default Hi, I’m Adarsh Vishwakarma. *[pause]* I am a software developer intern at IQVIA in Kochi, April 2026 to the present. I architected two FastAPI systems, not a chat wrapper. Deep Research is a LangGraph: a planner fans work to Firecrawl, Bing, DuckDuckGo, and Google Playwright, a ranker scores quality, recency, and agreement across sources, and a writer synthesizes from graph state so a dead scrape does not restart the run. That ranker is the product — I ranked information across **200+** websites. Hybrid RAG is the BRD system: Azure AI Search Hybrid plus Semantic, GraphDB hops for requirement dependencies, and LangGraph adaptive retrieval on **200+** page BRDs and PDFs. The writer is citation-gated. LangSmith traces evals and generated test cases. Production for this intern is Python; this loop’s Live Code is Java. Before IQVIA I interned at Ylogx from November 2024 to October 2025 on full-stack AI business intelligence — Python FastAPI, NestJS, REST, PostgreSQL. I shipped a custom report builder with **40%** faster report generation and **99.9%** uptime, a LangChain SQL RAG chatbot that raised data-analysis productivity **65%**, row-level security and RBAC for **three** organizational tiers, Redis that cut bot database latency **35%**, and **30** real-time KPI dashboards. We deployed on AWS with CloudFront, ECS, and Docker, held **sub-210 ms** on that dashboard path, and routed GoDaddy DNS through Route 53 to an ALB. The rest of the resume is breadth I can go deep on if you want a different slice: core software on Team Horizon’s Mars rover, **17th** globally of **80+** teams at ERC 2024, GStreamer camera at **60 FPS**, costmap planning that cut collision risk **55%**; Argus, a YOLOv9 PPE system from **73% to 89% mAP** on **15,000+** images at **24 FPS** across **20+** camera feeds; and **eight** hackathons including first at CodeRecet, Best Project at MLH.io, and runner-up at Magnathon 2.0. I am looking at Amazon SDE I because I already own the slice I ship **end to end** — interface, data, security, deploy, eval — and I want that ownership on systems where the customer bar is the product. At Ylogx that meant RLS in the database, not a UI hide, through to CloudFront. At Horizon the ERC date did not move, so camera and costmap had to work on the day. At IQVIA a fluent paragraph is not an answer unless LangSmith can show a span. That is the job I want here: one service, mine, correct under load. *[stop]* Do not dump StratifyLabs, GiftedBooks, IEDC, and CGPA **8.42** into the same ninety seconds. Those wait for “a project” or “education.” CUSAT CSE, October 2022–May 2026, is one clause if they ask school. ### 45-second brief Hi, I’m Adarsh Vishwakarma. *[pause]* I am an IQVIA intern in Kochi, April 2026 to now. I built two LangGraph systems on FastAPI: Deep Research that ranks **200+** websites, and Hybrid RAG on **200+** page BRDs with Azure AI Search, GraphDB, and LangSmith. Before that, Ylogx: full-stack AI BI, SQL RAG behind three-tier RLS, **99.9%** uptime, **40%** faster reports, Redis **−35%** on the bot path. I want Amazon SDE I to own a service the same way — end to end, with isolation and uptime as part of the ticket, not a wrap around an LLM. Live Code is Java; those internships shipped Python and TypeScript. If they already know IQVIA: swap the middle sentence for Horizon **17th / 80+** or Argus **73→89 mAP**. Keep one why-Amazon sentence. ### Delivery - Pause after the name. Let them write it down. - **I** architected, **I** shipped, **I** gated. Team Horizon and hackathons can be “I was core software” / “I won,” not “we all.” - If they interrupt at IQVIA, do not force Ylogx. The rest of the ninety seconds is optional. - If they ask “why Amazon” as a separate LP: stay on ownership and customer bar. Do not recite sixteen principle names. GiftedBooks (students, doubts **hours → 3–10 min**, **99.5%** uptime, **sub-300 ms**) is the Customer Obsession backup, not a second intro. - GitHub InstaRecon / PhiSiFi: one ethics line, then redirect. No exploit talk. - Login Tracker: unverified. If they describe insert + oldest-login, ask them to name the API; do not claim you prepared it as a Job **10454435** question. --- ## 2. When you know / when you don’t ### When you know the problem (Live Code) Restate the input, output, and constraints in your own words until they nod. Ask the three to six clarifications that change the DS: null / empty, duplicates, directed vs undirected, mutate in place, return values vs print, n-ary vs binary, “no parent mapping” meaning no `Map` versus still passing `parent` as an argument. Then speak the approach before typing. Brute first, in one sentence, with why it dies on their n. Optimal DS next, and why. Say **time and space** before the first method signature. Write Java they can read: clear names, no golf, helpers if the hot loop is noisy. Talk the invariant while you type (`left` is the last index that still works; the heap is size k). Dry-run **their** example in a tiny table: pointer / heap top / answer so far. If the editor does not run, that table is the execution. One edge out loud before you sit back: empty, single node, all equal, k = 0, overflow. Fix it if the dry run shows a bug. Do not claim “should be fine.” Same-slot DSA after a Fluency chat: stop the essay, write the heap or the tree. ### When you don’t Never bluff a library, a complexity, or a production system you did not run. “I have not operated Kafka; here is the CS, and here is the adjacent thing I did” is a pass. Inventing a Ylogx topic list is not. Adjacent knowledge is allowed if you label it. You have not run Kafka; you have run Redis as cache at Ylogx (**−35%** bot DB latency) and you have seen Celery + Redis as an async job queue on **GitHub Warpflow** — that is GitHub / prep-adjacent, **not** a Ylogx or IQVIA resume bullet, and it has no extra metric. Postgres B+ indexes are under Ylogx because Ylogx is Postgres, not because you tuned `fillfactor`. If the prompt is unnamed, do not guess the LeetCode id. Pattern-card it: “this is a monotonic stack / this is BFS on implicit graph.” Unnamed stays unnamed. If you go quiet, narrate the silence. “I am checking whether a HashMap of parents violates ‘no parent mapping.’ I will recurse with parent instead.” Ten seconds of labeled thought is better than a fake API. If you only have brute: say so, write brute, state the optimal DS, ask if they want you to implement that next. Partial correct code plus a named heap beats an empty editor and a confident wrong graph. Do not paste Copilot into Live Code without tracing. That is the Vaishali / LC 8014509 bar — same as your own Java. Models invent APIs, miss RLS, and hide O(n²) in a nested loop. If they ask something off-resume (Qdrant, Haar-first Argus, Django CUSAT portal, uncensored LLM): do not adopt it. “That is not on the August 2026 resume; the retrieval I shipped is Azure AI Search plus GraphDB” — then the true story. --- ## 3. GenAI / Fluency answers (bible §5.E exact prompts) **Primary story:** IQVIA LangGraph + Hybrid RAG + LangSmith. **Secondary:** Ylogx SQL RAG behind RLS. GiftedBooks = resume PDF Q&A only (not AegisAI). **Should not** is a named project plus a metric, not a generic “high stakes” essay. UTA two-tech Rank A generally named **no** GenAI-primary question. If this hour is two DSA, keep the three-block pack in your pocket and do not volunteer it. **Three-block pack** (Nitesh unnamed R2; Reddit AUTA 1ueybmg 2–3 general AI Qs unnamed): (1) IQVIA 60s, (2) where not to use an LLM, (3) how you verify (LangSmith / SQL under role / compile Java). Do not invent their wording. --- ### How do you use Gen AI tools in projects / personal work? Complex tasks? Where should / should not use? — mapped R3 — not UTA-default — [LC 7850431](https://leetcode.com/discuss/post/7850431/amazon-sde-1-interview-experience-by-imx-xitu/) **What they actually asked:** how you use GenAI at work and personally; complex tasks; where you should and should not use it. **Same slot also had** dynamic **k-th largest** (k changes) — DSA. If they context-switch, stop this answer and write the heap. I use GenAI where the output is high-volume, pattern-based, and cheaply verifiable. At IQVIA that is Deep Research ranking across **200+** sites and Hybrid RAG on **200+** page BRDs and PDFs, with LangSmith on traces, evals, and test-case generation. At Ylogx that is LangChain SQL RAG: natural language to SQL **behind RLS**, which is the **+65%** analysis-productivity bullet. GiftedBooks is PDF question answering when the answer must come from the uploaded file — resume only, not the AegisAI README. The complex work is a LangGraph of tools — Firecrawl, Bing, DuckDuckGo, Google Playwright — then a ranker, plus adaptive retrieval among lexical, semantic, and GraphDB hops. A linear chain fails when an empty scrape still feeds the writer, when two tools must run in parallel, or when you need retrieve → grade → retrieve again. Ylogx did not need a graph. IQVIA did. I do not retrofit LangGraph onto the chatbot bullet. **Should:** cited chunks, executable SQL, generated test cases a human can spot-check. **Should not:** Ylogx **RLS / RBAC policy** (three tiers live in Postgres, not in a prompt); Horizon **costmap / actuation** (collision risk **−55%** is planner plus sensors); Argus **PPE boxes** (**73% → 89% mAP**, **24 FPS**, YOLOv9 on **15,000+** images); unpaid invoices or money totals without a SQL result; confidential BRD sentences without a span; the Ylogx **sub-210 ms** dashboard hot path. Personal Copilot drafts boilerplate; I compile, run, and bounds-check before I own the merge. ```python # sidecar — IQVIA-shaped state, not a shipped service from typing import TypedDict, Annotated import operator class ResearchState(TypedDict): query: str docs: Annotated[list[dict], operator.add] # parallel tools append ranks: list[dict] answer: str # nodes: plan → (bing | ddg | firecrawl | playwright) → rank → write # MemorySaver checkpoint: failed playwright does not wipe bing docs ``` If they still want “personally”: same bar as Vaishali. I do not paste into Live Code without tracing. --- ### How do you make the best use of LLMs? Verify / validate? Efficiency tips? — mapped R3/HM — [LC 7724048](https://leetcode.com/discuss/post/7724048/amazon-sde-1-interview-experience-by-ano-t6fz/) **Same slot also had** **Next Greater Element** — DSA. Point to that card if they switch. I narrow the output to SQL, a cited sentence, or a test case — not open-ended strategy. I verify with LangSmith traces from query to chunks to answer on **IQVIA only**; I execute SQL as the user’s RLS role at Ylogx; I fail closed if there is no overlapping span; I keep gold questions. Fluency is not correctness. That is why evals exist. Efficiency is hybrid search so the model sees **5–20 chunks**, not 200 pages; Redis on hot bot queries (**−35%**); cached scrapes; do not re-embed a BRD per question. Anti-patterns: stuffing the whole PDF, Playwright on every URL, an LLM on the dashboard hot path. Schema and examples go in the prompt. I say “return SQL only” or “cite or abstain.” The token budget is retrieval quality, not a bigger context window. GiftedBooks **sub-300 ms** is a latency SLA, not an eval harness. I do not steal LangSmith onto Ylogx. If they probe “efficiency tips,” I talk hybrid retrieve and Redis, not a larger model. --- ### Hallucination, temperature, RAG, embeddings, prompt engineering, token limits **Hallucination / RAG** was intern-asked on [LC 8463405](https://leetcode.com/discuss/post/8463405/) (format-similar, not FTE UTA evidence). Temperature / embeddings / prompt / tokens are **Standard CS** unless they reuse Deepak’s token-limit prompt below. Do not invent a Job **10454435** “trap” story. **Hallucination.** Next-token models optimize fluency, not truth. They do not know my BRD. RAG **reduces** hallucination; it does not delete it. A wrong chunk still yields a confident wrong answer. Contradiction across sources looks like confidence unless I rank by **agreement and source type** — that is the Deep Research ranker, not first-hit Google. Mitigation: retrieve → constrain decode (“answer only from context”) → cite → eval → abstain. IQVIA fails closed without a span. LangSmith made empty-scrape-then-writer visible. Ylogx RLS is the hard guardrail so a clever prompt cannot read another tenant. GiftedBooks answers from **their** PDF. **Temperature.** Lower temperature reduces randomness. It does **not** create grounding. Temperature zero on a missing chunk is still a fluent lie. If they blame temperature, I show the missing chunk in the trace first. **RAG.** Retrieval-augmented generation: index documents, retrieve a small set, generate only from that set. IQVIA is Hybrid RAG — Azure AI Search **(Hybrid + Semantic)** plus GraphDB hops, LangGraph choosing the mode. Sparse / keyword hits clause IDs (`REQ-1044`). Dense embeddings hit paraphrase (“what is the retention policy”). Hybrid is both in one retrieve. Azure “Semantic” here is Azure’s **semantic ranker** on top, not “we invented a new embedding.” I do not say “semantic search” when I mean “we cosined vectors.” Vector-only was the wrong default on clause-ID BRDs: similar embeddings are not requirement coverage. Qdrant is **not** on the August 2026 resume. **Embeddings.** They are the **index**, not the product. Cache them (GiftedBooks small PDF, **sub-300 ms**). Do not re-embed a 200-page BRD on every question. Fine-tune is for style or format, not a substitute for Monday’s new BRD. Frugality: Azure AI Search versus training a private embedder. I did not train a foundation model. **Prompt engineering.** Schema, allowed metrics, worked examples, output contract: “SQL only,” “cite or abstain.” Retrieved text is **data**, not a system prompt (injection). Tool allow-list, row cap, timeout, no `pg_catalog`, no full confidential PDFs in traces. Credentials stay out of LangSmith. **Token limits.** **200+** pages do not fit. Three months of order rows do not fit. Fix: aggregate / retrieve / graph hop **before** generate. Efficiency is fewer tokens in. A million-token window still does not replace ranking and citations. ```java // cite-or-abstain shape (eval idea). Real IQVIA gate is LangSmith overlap, not this toy. static String writeOrAbstain(String draft, List chunks) { for (String chunk : chunks) { if (chunk != null && !chunk.isEmpty() && draft.contains(chunk.substring(0, Math.min(40, chunk.length())))) { return draft; } } return "I cannot answer from the retrieved context."; } ``` --- ### Prompt engineering, token limits, DS for “highest KFC orders last 3 months” — mapped R3 — Deepak Jul 2026 — [LinkedIn](https://www.linkedin.com/posts/deepak-gautam-a77b93222_amazon-sde-interviewexperience-activity-7485166684211671040-d-gv) **What they actually asked:** prompt engineering, token limits, and a data structure / system for “highest KFC orders last 3 months.” Closest calendar-adjacent R3-shaped CS+GenAI in the bible; **not named UTA**. Not a Job **10454435** prediction. I do not dump ninety days of tickets into an LLM. That blows the context window and hallucinates counts. The warehouse is `(store, day, item, qty)`. I **pre-aggregate** the last 90 days in SQL, then top-K. The LLM only translates natural language to SQL or explains the result. Same pattern as Ylogx SQL RAG: schema plus allowed metrics plus “return SQL only,” executed as the caller’s RLS role so another org’s rows never exist. Dashboards stay **sub-210 ms** off this path. Ylogx SQL RAG is **+65%** analysis productivity. If they want an in-memory DS, I say that is **DSA sitting beside** SQL RAG: `HashMap` then a heap of size K. I do not pretend the heap is how production BI ran. ```sql -- executed as the caller's DB role; RLS still applies SELECT store, SUM(qty) AS orders FROM sales WHERE day >= CURRENT_DATE - 90 GROUP BY store ORDER BY orders DESC LIMIT 10; ``` ```java // only if they ask the in-memory DS — not a substitute for SQL static List topKStores(Map storeToCount, int k) { PriorityQueue> heap = new PriorityQueue<>(Comparator.comparingLong(Map.Entry::getValue)); for (Map.Entry e : storeToCount.entrySet()) { heap.offer(e); if (heap.size() > k) heap.poll(); } List out = new ArrayList<>(); while (!heap.isEmpty()) out.add(heap.poll().getKey()); Collections.reverse(out); return out; } ``` --- ### Validate AI-generated code; reliability; errors; not blind trust — mapped R3-GenAI — Vaishali — [LinkedIn](https://www.linkedin.com/posts/vaishali-sahu-25205a359_amazon-interviewexperience-sde1-activity-7438128678401789953-6I04) Family of [LC 8014509](https://leetcode.com/discuss/post/8014509/amazon-sde-1-interview-experience-by-pra-azvd/) “how verify GenAI code” (that HM was **mixed**: GenAI + LCA + process scheduler — LCA is a tree card, scheduler is a PQ / fairness LLD, **not** an LLM). Models invent APIs, miss RLS, write O(n²), and skip bounds. I do not blind-trust a fluent snippet. Checklist, in this order: compile; run / dry-run **their** example; say complexity out loud and hunt a hidden nested loop; null, empty, overflow; security — service-role SQL that skips RLS is a leak even if the SELECT looks pretty. IQVIA evals exist because fluency ≠ correctness. Test-case generation from BRDs is itself a traced job; humans spot-check a sample. Ylogx: gold NL → expected SQL **shape**, plus fixtures that denied cross-tier rows. Personally I use Copilot for boilerplate and I own the merge. AuthZ, money, PPE boxes, and rover actuation have no LLM as source of truth. ```java // Copilot-shaped miss: looks fine, is O(n^2), and would fail the out-loud complexity check. static int badSumCounts(int[] a) { int n = a.length, c = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) if (a[j] == a[i]) c++; } return c; } // I rewrite to a HashMap of frequencies, O(n), before I submit. ``` --- ### YouTube prod issue, 1 hour, may use AI — mapped HM — [LC 8029194](https://leetcode.com/discuss/post/8029194/amazon-interview-sde-1-selected-by-anony-qatd/) **Not “design YouTube.”** Incident: playback / upload / search broken; **60 minutes**; AI **allowed as copilot**. I scope first: error rate, region, client version — metrics before a patch. AI may summarize logs or cluster hypotheses. I do **not** apply a patch because the model said so. I verify with a one-box repro, a feature flag, and a rollback. Habit, not YouTube SRE: traces (LangSmith-style on IQVIA agents) and uptime as a product constraint. Resume hooks I will actually claim: Ylogx **99.9%** uptime, GiftedBooks **99.5%**. I did not run a YouTube outage. If they turn it into retail HLD, I clarify it is an incident hour and stay on metrics, flag, and rollback. --- ### Similar to nodes at distance K; O(n); no parent mapping — slot **labeled Gen AI Fluency** — mapped R3 — **this was DSA** — [LC 7623949](https://leetcode.com/discuss/post/7623949/amazon-sde-1-application-interview-exper-92xt/) Reprint constraint: AUTA [LC 7406809](https://leetcode.com/discuss/post/7406809/amazon-sde-1-auta-interview-experience-s-k6t7/) R2. **Do not invent a Fluency essay.** One sentence: this slot was labeled GenAI Fluency and the question is Distance K on a tree, O(n), without allocating a parent map. Full Java brute + optimal + dry run: **Answer-BIBLE Dist-K card** (and AUTA R2 card). Recurse `(node, parent, remaining)` or build parents in one DFS only if they allow a map; collect at distance K; skip the parent pointer so you never walk back into it. Intern echoes of the same trap: oncampus Fluency = Next Greater + stocks max-2-tx DSA; LC 7643209 Fluency = min-heap (NDA, unnamed). Code first. One IQVIA sentence **after** the tree if they still want Fluency: Hybrid RAG plus LangSmith traces, then stop. --- ### Remaining §5.E prompts (keep short) **30 min architecture + Innovate / Frugality** — extra / R3-shaped — [LC 7981646](https://leetcode.com/discuss/post/7981646/). Whiteboard **my** system, not Amazon retail HLD. Invent: adaptive retrieval + GraphDB instead of “embed the BRD and hope”; Deep Research as a graph (retries, parallel tools, checkpoint), not a linear chain. Frugality: Azure AI Search vs a private embedder; Redis vs a bigger RDS (**−35%**); fewer Playwright renders; Bing snippets before a full page. I do not train a foundation model. Draw: Client → FastAPI → LangGraph state → Azure hybrid + GraphDB hop → writer → LangSmith. Clarify citation SLA, max latency, confidential BRDs (no full-doc traces). **GenAI-related UNNAMED** — Nitesh R2. Exact prompt unnamed. Three-block pack. Do not guess RAG vs agents. **2–3 general AI Qs UNNAMED** — [Reddit AUTA 1ueybmg](https://old.reddit.com/r/LeetcodeDesi/comments/1ueybmg/amazon_sde1_auta_india_interview_experience_offer/) R3. Also LC Hard sliding window UNNAMED. Same pack. Rank A two-DSA often **skips** this. **How use GenAI; experience; verify GenAI code; plus LCA; process scheduler** — [LC 8014509](https://leetcode.com/discuss/post/8014509/amazon-sde-1-interview-experience-by-pra-azvd/) HM. Mixed. GenAI = this section. LCA = tree. Scheduler = LLD with a priority queue, not a prompt. **Intern (format-similar, not UTA evidence):** hallucination/RAG LC 8463405; “what problems could AI help solve” / trust / which tools — DEV intern VO (Class B help-account: use the **prompt**, not their DSA titles). Help = NL→SQL behind RLS, research rank, BRD test-case drafts, PDF Q&A, Stratify Gemini bots. Trust = evals and gates, not the vendor name. Tools I name are what I shipped: LangGraph, LangChain, LangSmith, Azure AI Search, YOLOv9. --- ## 4. Java traps actually asked or Standard CS labeled UTA two-DSA Rank A generally **did not** name OS/DB/CN. Rohit Jain R2 named **core CS UNNAMED** — do not invent that list. Answer from the **named** §5.F set if they probe CS. Uninitialized locals and `static` were **not** in §5.F; they are **Standard CS**. Do not invent an Amazon “they tricked me with a local int” story without a URL. --- ### Uninitialized local variables vs instance fields — **Standard CS** (not in bible §5.F) Java does **not** default a **local** to `0` or `null`. If you read it before assignment, that is a **compile error**. Instance (and static) **fields** do default: `0`, `0L`, `0.0`, `false`, `null`. The trap in Live Code is speaking C/C++ (“it’s zero”) while the editor is Java. I say “local must be assigned; the field on the object is already zero.” ```java class Defaults { int fieldInt; // 0 String fieldName; // null static boolean flag; // false void demo() { int local; // System.out.println(local); // compile error — not 0 local = 0; System.out.println(local); // 0 System.out.println(fieldInt); // 0 System.out.println(fieldName); // null } } ``` If they ask why: definite assignment for locals is a language rule so you cannot silently read garbage. Fields live as long as the object; the spec gives them defaults. --- ### `static` / static nested class / static blocks — **Standard CS** (not in bible §5.F) `static` belongs to the **class**, not an instance. A static method cannot touch instance fields without an object. A static **block** runs once when the class is initialized, in textual order with static field initializers. A **static nested class** has no hidden `Outer.this`. I use it in Live Code for `ListNode` / heap nodes / LRU nodes when I do not want a non-static inner class capturing the outer instance. A non-static **inner** class *does* hold `Outer.this` — that is extra memory and a leak if it outlives the outer. ```java class Outer { int instanceVal = 1; static int classVal = 1; static { classVal = 2; // once per class load } static class Nested { void print() { System.out.println(classVal); // System.out.println(instanceVal); // compile error — no Outer.this } } class Inner { void print() { System.out.println(instanceVal); // Outer.this.instanceVal } } } ``` Static methods are **hidden**, not overridden. `@Override` on a static method is a lie; I do not write it. --- ### HashMap vs HashSet, `equals` / `hashCode` — **IE-asked** — [LC 6570344](https://leetcode.com/discuss/post/6570344/amazon-sde-1-loop-interview-by-anonymous-i0v6/) (§5.F, after review-word-count DSA) **Why PriorityQueue** sat on the same 6570344 follow-up: top-K / Huffman-style merge / Dijkstra — heap, not a fully sorted `TreeMap`. Word-count: HashMap counts + size-K heap. A `HashMap` is an array of bins, capacity a power of two. Mix `h ^ (h >>> 16)` so high bits affect the index, then `h & (n - 1)`. Get: land in a bin, then `equals`. Collisions start as a list; Java 8+ **treeifies at 8** when the table is large enough; untreeify on shrink. Load factor **0.75** → resize **2×**. Average get/put O(1); a broken hash is O(n) until treeify, then O(log n) in that bin. `HashSet` is a `HashMap` of keys plus a dummy value. One `null` key in `HashMap`. `ConcurrentHashMap` allows no nulls and is not a drop-in unless they asked for threads. Contract: if `a.equals(b)` then `a.hashCode() == b.hashCode()`. Override **both** or neither. `equals(Student)` without `equals(Object)` **overloads**; HashMap will not call it. Mutable key after `put` → lost entry. Prefer `Map` with final roll as the key. Ylogx Redis (**−35%**) is **outside** the JVM. In Live Code the map **is** the index. ```java class Roll { final int n; Roll(int n) { this.n = n; } @Override public boolean equals(Object o) { if (!(o instanceof Roll)) return false; Roll r = (Roll) o; return r.n == n; } @Override public int hashCode() { return Integer.hashCode(n); } } // HashSet.add(x) ≡ map.put(x, PRESENT) Map map = new HashMap<>(); Set set = new HashSet<>(); map.put(new Roll(5), "ok"); System.out.println(map.get(new Roll(5))); // "ok" — value equality ``` If they only want the one-liner: HashMap is key → value; HashSet is unique keys; both need a stable `equals`/`hashCode`; I use HashMap when I am counting, HashSet when I only care whether I have seen it. --- ### Kafka ordering / partitioning; B-Tree vs B+ Tree — **IE-asked** — [igreaper](https://igreaper.medium.com/amazon-sde-1-interview-experience-a69578a4f699) (their R3 = OA-as-R1 remap, **not** UTA two-DSA) Asked because **that candidate’s stack** had Kafka. This resume does **not**. I have not operated Kafka in internships. Ylogx was Postgres plus Redis cache, not a broker. Argus alerts logged to PostgreSQL. I will not invent a topic name. **CS if they still want it:** order is **per partition**, not topic-global. Same key → same partition → FIFO for that key. More partitions buy consumer parallelism, not a total order. Global order means one partition and you gave up scale. **Adjacent, labeled:** I know an async **job queue** shape from GitHub **Warpflow** (Celery + Redis workers) — prep/GitHub, **not** a Ylogx or IQVIA bullet, no extra percent. Ylogx Redis is cache-aside on bot queries, **−35%**, fail-open to Postgres, fail-closed on RLS. That is not Kafka. ```java // conceptual only — I did not ship a Kafka client // ProducerRecord rec = new ProducerRecord<>("events", tenantId, json); // same tenantId → same partition → FIFO for that tenant ``` **B vs B+:** both multiway, disk-friendly, high fanout, short height. **B-tree** stores keys and data in internal nodes. **B+:** all keys in leaves, leaves linked for range scans, internals are indexes only. Postgres / InnoDB style indexes are B+ flavored. Ylogx KPI range queries sit on Postgres; I did not tune B+ by hand. Live Code remains HashMap and heap, not a page-layout lecture. If they push a cluster diagram or a Ylogx topic, I refuse. Honest line, then Postgres + Redis, then stop. --- ### Other §5.F CS (one breath each, only if they ask) **Processes vs threads / deadlocks / memory** — [IE.in 2025-grad](https://interviewexperiences.in/experience/amazon/amazon-sde-1-2025-grad) R1. **Same loop as Rate Limiter** (OA+3 SD), **not** UTA two-DSA. Rate Limiter SDE I count stays **1**. Process = isolated address space; thread = shared heap. Java `Thread` / pool shares the JVM. Deadlock: four Coffman; fix lock order / `tryLock`. Heap vs stack; GC. Do not lecture generations unless asked. **CN / transactions / Bankers / threads vs processes** — [GFG sde-1-17](https://www.geeksforgeeks.org/interview-experiences/amazon-interview-experience-for-sde-1-17/). TCP reliable byte stream vs UDP. Honest UDP: Horizon GStreamer **60 FPS**, not Kafka. Transactions: ACID, Ylogx Postgres. Bankers = deadlock **avoidance**, rare in app Java — say that. **DNS / MAC vs IP / thrashing / VM** — GFG Dec **2020**, older. DNS: Ylogx GoDaddy + Route 53 → ALB. MAC L2 vs IP L3. Thrashing: working set > RAM. **S3 / NoSQL / sharding / Docker / EC2 / REST** — IE.in L4 2025 fresher, after BR. Ylogx **REST** on **Docker / ECS**, CloudFront in front. I did **not** shard. RLS + one primary is what shipped. S3 = object store vs Postgres for RLS rows. NoSQL / Redis when you have no joins (session / hot bot answers). I did not run EC2 by hand as the production story. **core CS UNNAMED** — Rohit Jain LinkedIn R2. Unnamed stays unnamed. Use the named set above. Do not volunteer a ten-minute OS lecture during a Fluency or LP hour.