Query
stringlengths
2
286
Type
stringclasses
19 values
How do I implement a binary tree inorder traversal?
Coding
How do I rotate an array to the right by k steps?
Coding
How do I find the first non-repeating character in a string?
Coding
Write FizzBuzz in Python.
Coding
How do I flatten a deeply nested JSON object?
Coding
How do I use virtual environments in Python?
Coding
What does pip freeze do and why use a requirements.txt?
Coding
How do I make a simple to-do list app with HTML, CSS, and JavaScript?
Coding
How do I store data in localStorage?
Coding
Write a CSS rule that makes images responsive.
Coding
How do I create a table in SQL with a primary key and a foreign key?
Coding
Write a query that joins students and grades and averages scores.
Coding
How do I use GROUP BY and HAVING in SQL?
Coding
What is an index in a database and when should I add one?
Coding
How do I normalize a table to third normal form? Give a small example.
Coding
How do I write a Dockerfile for a simple Python Flask app?
Coding
How does HTTPS protect a connection at a high level?
Coding
How do I hash a password before storing it?
Coding
What is XSS and how do I avoid it in a web form?
Coding
How do I use environment variables instead of hard-coding secrets?
Coding
Write a recursive function to compute the sum of a nested list of numbers.
Coding
How do I memoize a recursive Fibonacci function?
Coding
What is dynamic programming? Show coin-change as an example.
Coding
How do I implement BFS to find the shortest path in an unweighted graph?
Coding
Write a function to generate all permutations of a string.
Coding
How do I check if a binary tree is balanced?
Coding
How do I serialize and deserialize a binary tree?
Coding
Write a function that finds two numbers in an array that add up to a target.
Coding
How do I implement a min-heap with an array?
Coding
What is a priority queue useful for?
Coding
How do I time a function's runtime in Python?
Coding
How do I profile a slow Python script?
Coding
How do I fix an off-by-one error in a loop?
Coding
What is the difference between pass-by-value and pass-by-reference?
Coding
How do I swap two variables in Python in one line?
Coding
Write a generator that yields Fibonacci numbers.
Coding
How do I use *args and **kwargs?
Coding
What is a decorator in Python? Write a simple timing decorator.
Coding
How do I make an API call and handle a timeout?
Coding
How do I paginate results from a REST API?
Coding
Write JavaScript that fetches JSON and renders a list in the DOM.
Coding
How do I prevent a form from submitting and validate fields first?
Coding
How do I use CSS grid to make a 3-column layout?
Coding
What is the box model in CSS?
Coding
How do I make a navbar that collapses on small screens?
Coding
How do I use media queries for a mobile-friendly page?
Coding
Write a Python script that renames all .txt files in a folder.
Coding
How do I walk a directory tree with os.walk?
Coding
How do I copy a file in Python?
Coding
Write a function that reads a log file and counts error lines.
Coding
How do I use regular expressions to extract dates from text?
Coding
How do I compile and run a C++ program from the command line?
Coding
What is the difference between a pointer and a reference in C++?
Coding
How do I avoid a segmentation fault when using arrays in C?
Coding
Write a Java method that checks if a year is a leap year.
Coding
How do I use ArrayList versus array in Java?
Coding
What is the difference between an interface and an abstract class?
Coding
How do I implement inheritance with a Vehicle and Car example?
Coding
Explain polymorphism with a short code example.
Coding
How do I catch multiple exception types in one block?
Coding
What is a race condition and how can a lock help?
Coding
How do I start a thread in Python?
Coding
What is the global interpreter lock in Python, simply?
Coding
How do I use promises in JavaScript instead of callbacks?
Coding
How do I handle errors in an async function with try/catch?
Coding
Write a function that retries a failing network request three times.
Coding
How do I mock an API call in a unit test?
Coding
What is test-driven development in one paragraph plus a tiny example?
Coding
How do I set up a simple CI workflow that runs tests on push?
Coding
How do I squash commits with git rebase -i?
Coding
What is the difference between git merge and git rebase?
Coding
How do I undo the last commit but keep the changes?
Coding
How do I write a .gitignore for a Python project?
Coding
How do I use pandas to filter rows where score > 90?
Coding
How do I make a bar chart with matplotlib?
Coding
Write a numpy snippet that computes the mean of each column.
Coding
How do I train a tiny decision tree with scikit-learn on a CSV?
Coding
What is overfitting and how can I spot it?
Coding
How do I split data into train and test sets?
Coding
Write a function that tokenizes a sentence into words.
Coding
How do I compute TF-IDF at a conceptual plus tiny-code level?
Coding
How do I save a Python object with pickle safely (and when not to)?
Coding
How do I use JSON instead of pickle for data I share?
Coding
Write an algorithm to find the longest common subsequence.
Coding
How do I implement edit distance (Levenshtein) with DP?
Coding
Write code to check if a graph is bipartite.
Coding
How do I find strongly connected components?
Coding
How do I implement Dijkstra's algorithm with a heap?
Coding
What is A* search and when is it better than Dijkstra?
Coding
Write a function that evaluates a postfix expression.
Coding
How do I convert infix to postfix with a stack?
Coding
How do I implement an LRU cache?
Coding
Write a trie that can insert and search words.
Coding
How do I find the kth largest element in an unsorted array?
Coding
How do I rotate a matrix 90 degrees in place?
Coding
Write a function that spirals a matrix into a list.
Coding
How do I search in a rotated sorted array?
Coding
How do I find the peak element in a bitonic array?
Coding
Write a sliding-window function for maximum sum of k consecutive elements.
Coding
How do I find the longest substring without repeating characters?
Coding