> For the complete documentation index, see [llms.txt](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews.md).

# Interviews

- [Google Leetcode](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode.md)
- [Repeated String Match](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/repeated-string-match.md)
- [K Empty Slots](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/k-empty-slots.md)
- [Next Closest Time](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/next-closest-time.md)
- [Longest Univalue Path](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/longest-univalue-path.md)
- [License Key Formatting](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/license-key-formatting.md)
- [Spiral Matrix](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/spiral-matrix.md)
- [Plus One](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/plus-one.md)
- [Trapping Rain Water](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/trapping-rain-water.md)
- [Longest Substring with At Most K Distinct Characters](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/longest-substring-with-at-most-k-distinct-characters.md)
- [Add Bold Tag in String](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/add-bold-tag-in-string.md)
- [Game of Life](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/game-of-life.md)
- [Read N Characters Given Read4](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/read-n-characters-given-read4.md)
- [Read N Characters Given Read4 II - Call multiple times](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/read-n-characters-given-read4-ii-call-multiple-times.md)
- [One Edit Distance](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/one-edit-distance.md)
- [Valid Palindrome](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/valid-palindrome.md)
- [Valid Number](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/valid-number.md)
- [Valid Parentheses](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/valid-parentheses.md)
- [Image Smoother](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/image-smoother.md)
- [Intersection of Two Arrays](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/intersection-of-two-arrays.md)
- [Max Consecutive Ones](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/max-consecutive-ones.md)
- [Max Consecutive Ones II](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/max-consecutive-ones-ii.md)
- [Shortest Palindrome](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/shortest-palindrome.md)
- [First Missing Positive](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/first-missing-positive.md)
- [First Unique Character in a String](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/first-unique-character-in-a-string.md)
- [Move Zeroes](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/move-zeroes.md)
- [Remove Duplicates from Sorted Array](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/remove-duplicates-from-sorted-array.md)
- [Merge k Sorted Lists](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/merge-k-sorted-lists.md)
- [Insert into a Cyclic Sorted List](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/insert-into-a-cyclic-sorted-list.md)
- [Evaluate Division](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/evaluate-division.md)
- [Inorder Successor in BST](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/inorder-successor-in-bst.md)
- [Robot Room Cleaner](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/robot-room-cleaner.md)
- [Redundant Connection II](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/redundant-connection-ii.md)
- [Course Schedule](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/course-schedule.md)
- [Validate Binary Search Tree](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/validate-binary-search-tree.md)
- [Closest Binary Search Tree Value](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/closest-binary-search-tree-value.md)
- [Word Squares](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/word-squares.md)
- [Strobogrammatic Number II](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/strobogrammatic-number-ii.md)
- [Word Search II](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/word-search-ii.md)
- [Android Unlock Patterns](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/android-unlock-patterns.md)
- [Minimum Window Substring](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/minimum-window-substring.md)
- [Kth Largest Element in an Array](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/kth-largest-element-in-an-array.md)
- [Shortest Distance from All Buildings](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/shortest-distance-from-all-buildings.md)
- [Find K-th Smallest Pair Distance](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/find-k-th-smallest-pair-distance.md)
- [Find K Pairs with Smallest Sums](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/find-k-pairs-with-smallest-sums.md)
- [Range Module](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/range-module.md)
- [Insert Interval](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/insert-interval.md)
- [Sort Transformed Array](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/sort-transformed-array.md)
- [Merge Intervals](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/merge-intervals.md)
- [Longest Palindromic Substring](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/longest-palindromic-substring.md)
- [Next Greater Element I](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/next-greater-element-i.md)
- [Pacific Atlantic Water Flow](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/pacific-atlantic-water-flow.md)
- [Evaluate Reverse Polish Notation](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/evaluate-reverse-polish-notation.md)
- [Decode Ways](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/decode-ways.md)
- [Word Break](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/word-break.md)
- [Sentence Screen Fitting](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/sentence-screen-fitting.md)
- [Maximum Vacation Days](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/maximum-vacation-days.md)
- [Edit Distance](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/edit-distance.md)
- [Minimum Path Sum](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/minimum-path-sum.md)
- [House Robber II](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/house-robber-ii.md)
- [Moving Average from Data Stream](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/moving-average-from-data-stream.md)
- [Peeking Iterator](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/peeking-iterator.md)
- [Binary Search Tree Iterator](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/binary-search-tree-iterator.md)
- [Zigzag Iterator](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/zigzag-iterator.md)
- [Design Tic-Tac-Toe](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/design-tic-tac-toe.md)
- [Range Sum Query 2D - Mutable](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/range-sum-query-2d-mutable.md)
- [UTF-8 Validation](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/utf-8-validation.md)
- [Maximum Product of Word Lengths](https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews/google-leetcode/maximum-product-of-word-lengths.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ondrej-kvasnovsky-2.gitbook.io/algorithms/interviews.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
