Given an array of integers nums
and an integer target
, return the indices of the two numbers such that they add up to target
.
- Hash Map
- Brute Force Search
Given n
non-negative integers a1, a2, ..., an
, where each represents a point at coordinate (i, ai)
, n
vertical lines are drawn. Find two lines that together with the x-axis forms a container, such that the container contains the most water.
Given two words, beginWord
and endWord
, and a dictionary wordList
, return the length of the shortest transformation sequence from beginWord
to endWord
, such that:
Return 0 if no such sequence.
Given an input string s
and a pattern p
, implement regular expression matching with support for '.'
and '*'
:
'.'
Matches any single character.'*'
Matches zero or more of the preceding element.The matching should cover the entire input string (not partial).
Fix the Bug – React + Three.js Canvas Game
Avatar: Elena is building a small 3D mini-game in React + Three.js. It renders a basic scene with a player cube that can move left and right. But there’s a bug: the cube sometimes jumps or lags when key events fire rapidly, and the frame render isn't synced well with React state.
Application: A React + Three.js app where you need to fix a real rendering + input issue.