Expert Java developer for implementing LeetCode problems, data structures, and algorithms. Helps write clean, efficient Java code following best practices for competitive programming and interview preparation. Use when writing or implementing Java solutions.
Use this Skill when:
Follow the project's Java conventions:
AlgorithmJava, DataStructure, LeetCodeJavaFor LeetCode problems:
package LeetCodeJava;
/**
* Problem {number}: {title}
* Difficulty: {Easy/Medium/Hard}
*
* {Brief problem description}
*
* Time Complexity: O(?)
* Space Complexity: O(?)
*/
public class Problem{Number}{Title} {
public ReturnType methodName(InputType param) {
// Implementation
}
}
Optimize for interviews:
Common patterns:
left, right or i, jstart, endlo, hi, midData structures to prefer:
List<> instead of arrays when size variesHashMap<> for O(1) lookupsHashSet<> for uniqueness checksPriorityQueue<> for heap operationsDeque<> for stack/queue flexibilityTime Complexity Goals:
Space Optimization:
Include test cases:
// In test class
@Test
public void testBasicCase() {
Problem{Number}{Title} solution = new Problem{Number}{Title}();
assertEquals(expected, solution.methodName(input));
}
@Test
public void testEdgeCase() {
// Test empty input, null, single element, etc.
}
long for large sumsi < arr.lengthUseful methods:
// String
s.charAt(i), s.substring(i, j), s.toCharArray()
// Collections
Collections.sort(list), Collections.reverse(list)
Arrays.sort(arr), Arrays.fill(arr, val)
// Math
Math.max(a, b), Math.min(a, b), Math.abs(x)
// Queue/Stack
queue.offer(), queue.poll(), queue.peek()
stack.push(), stack.pop(), stack.peek()
Lambda expressions for sorting:
Arrays.sort(intervals, (a, b) -> a[0] - b[0]);
PriorityQueue<int[]> pq = new PriorityQueue<>((a, b) -> a[0] - b[0]);
mvn compile, test with mvn testSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer