# Problems

- [Lowest Common Ancestor of a Binary Tree](https://blog.bernardw.com/problems/lowest-common-ancestor-of-a-binary-tree.md)
- [Longest Substring Without Repeating Characters](https://blog.bernardw.com/problems/longest-substring-without-repeating-characters.md)
- [Longest Palindromic Substring](https://blog.bernardw.com/problems/longest-palindromic-substring.md)
- [Longest Common Prefix](https://blog.bernardw.com/problems/longest-common-prefix.md)
- [Isomorphic Strings](https://blog.bernardw.com/problems/isomorphic-strings.md)
- [Integer to Roman](https://blog.bernardw.com/problems/integer-to-roman.md)
- [Frog Jump](https://blog.bernardw.com/problems/frog-jump.md)
- [Find the Difference](https://blog.bernardw.com/problems/untitled-3.md)
- [Find k closest elements to a given value](https://blog.bernardw.com/problems/find-k-closest-elements-to-a-given-value.md)
- [Longest Common Subsequence](https://blog.bernardw.com/problems/longest-common-subsequence.md)
- [Binary Search Tree from Sorted Array](https://blog.bernardw.com/problems/binary-search-tree-from-sorted-array.md)
- [Balanced Binary Tree](https://blog.bernardw.com/problems/balanced-binary-tree.md)
- [Sort Using Two Stacks](https://blog.bernardw.com/problems/sort-using-two-stacks.md)
- [O(1) Stack](https://blog.bernardw.com/problems/o-1-stack.md)
- [k-th element to last of a LinkedList](https://blog.bernardw.com/problems/k-th-element-to-last-of-a-linkedlist.md): Implement an algorithm to find the kth to last element of a singly linked list
- [Dedup LinkedList](https://blog.bernardw.com/problems/dedup-linkedlist.md): Write code to remove duplicates from an unsorted linked list
- [Check Rotated String](https://blog.bernardw.com/problems/check-rotated-string.md): Find if a string is a rotation of another by using only one substring call
- [Compress String by Character Count](https://blog.bernardw.com/problems/compress-string-by-character-count.md): Compress string by character count
- [Escape HTML whitespace](https://blog.bernardw.com/problems/untitled-1.md): Escape white space with %20 in place
- [Check String Permutation](https://blog.bernardw.com/problems/check-string-permutation.md): Given two strings, write a method to decide if ones is a permutation of the other
- [Unique String](https://blog.bernardw.com/problems/unique-string.md): Implement an algorithm to determine if a string has all unique characters,What if you cannot use additional data structures?
- [Container With Most Water](https://blog.bernardw.com/problems/untitled-2.md)
- [4 Sum](https://blog.bernardw.com/problems/4-sum.md)
- [3 Sum Closest](https://blog.bernardw.com/problems/3sum-closest.md)
- [3 Sum](https://blog.bernardw.com/problems/3-sum.md)
- [2 Sum](https://blog.bernardw.com/problems/untitled.md)
- [Maximum Subarray](https://blog.bernardw.com/problems/maximum-subarray.md)
- [Nested List Weight Sum](https://blog.bernardw.com/problems/nested-list-weight-sum.md)
- [Palindrome Number](https://blog.bernardw.com/problems/palindrome-number.md)
- [Pow(x, n)](https://blog.bernardw.com/problems/pow-x-n.md)
- [Regular Expression Matching](https://blog.bernardw.com/problems/regular-expression-matching.md)
- [Remove Nth Node From End of List](https://blog.bernardw.com/problems/remove-nth-node-from-end-of-list.md)
- [Reverse Integer](https://blog.bernardw.com/problems/reverse-integer.md)
- [Roman to Integer](https://blog.bernardw.com/problems/roman-to-integer.md)
- [Rotate Array](https://blog.bernardw.com/problems/rotate-array.md)
- [Search a 2D Matrix](https://blog.bernardw.com/problems/search-a-2d-matrix.md)
- [Shortest Word Distance](https://blog.bernardw.com/problems/shortest-word-distance.md)
- [Two Sum III - Data structure design](https://blog.bernardw.com/problems/two-sum-iii-data-structure-design.md)
- [Valid Parentheses](https://blog.bernardw.com/problems/valid-parentheses.md)
- [ZigZag Conversion](https://blog.bernardw.com/problems/zigzag-conversion.md)
- [Quicksort](https://blog.bernardw.com/problems/quicksort.md)
- [Add Two Numbers](https://blog.bernardw.com/problems/add-two-numbers.md)
- [Best Time to Buy and Sell Stock](https://blog.bernardw.com/problems/best-time-to-buy-and-sell-stock.md)
- [Letter Combinations of a Phone Number](https://blog.bernardw.com/problems/letter-combinations-of-a-phone-number.md)


---

# Agent Instructions: 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:

```
GET https://blog.bernardw.com/problems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
