Day 75 of 133

Function calling, tool use, MCP + DSA Greedy finish

Schemas, retries, hallucinated args; MCP architecture.

DSA · NeetCode Greedy

  • Partition LabelsDSA · Greedy

    Interview questions to prep

    1. Prove the greedy choice — why is the locally-optimal pick safe globally? (Exchange argument or staying-ahead.)
    2. When does greedy fail on a similar-looking problem, and what would you reach for instead (DP, BFS)?
    3. Walk through edge cases that often break naive greedy: ties, negatives, single element.
  • Interview questions to prep

    1. Prove the greedy choice — why is the locally-optimal pick safe globally? (Exchange argument or staying-ahead.)
    2. When does greedy fail on a similar-looking problem, and what would you reach for instead (DP, BFS)?
    3. Walk through edge cases that often break naive greedy: ties, negatives, single element.

GenAI · Tool use & function calling

  • Interview questions to prep

    1. Walk through how function calling works under the hood — what does the model actually emit?
    2. How do you handle a model that hallucinates a tool call with bad arguments?
  • Interview questions to prep

    1. How would you design a tool catalog for a research agent — what are the trade-offs in granularity?
    2. Why do agents perform worse when you give them too many tools, and what's a good cutoff?
  • Interview questions to prep

    1. What problem does MCP solve compared to ad-hoc function calling?
    2. Walk me through how an MCP server is built and what guarantees the protocol gives you.

References & further reading