Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 99 results for YousicianPage 1 of 5
Coding
47
Merge K Sorted Linked Lists
Merge K sorted linked lists.
Input: lists = [[2,2,3],[1,5]]
Output: [1,2,2,3,5]
Explanation: Extracts the smallest current node iteratively using a priority queue to build a single merged and sorted linked list.
Break a string into space-separated words using a dictionary.
Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.
Input: s = "catsandog", wordDict = ["cats", "dog", "sand", "and", "cat"]
Output: FALSE
Explanation: There is no valid se…
Add Two Numbers Represented as Strings
Add two non-negative integers represented as strings.
Input: num1 = "456", num2 = "77"
Output: "533"
Explanation: Performs character-by-character addition from right to left, carrying the 1 from 6+7=13 to the next decimal place.
Lowest Common Ancestor on an N-ary Tree
Find the lowest common ancestor on an N-ary tree.
Input: root = [1,null,2,3,4], p = 2, q = 3
Output: 1
Explanation: Both nodes 2 and 3 are direct children of the root node 1, making 1 the lowest common ancestor.
Find the shortest path visiting all nodes in a graph.
You have an undirected, connected graph of n nodes. Return the length of the shortest path that visits every node. You may start and stop at any node, you may revisit nodes multiple times, and you may reuse edges.
Input: graph = [[1],[0,2],[1]]
Output: 2
Explanation: The graph is a…
Encode and Decode Strings
Encode a list of strings into a single string and decode it back.
Input: strs = ["","hello",""]
Output: ["","hello",""]
Explanation: Prepends chunk lengths and a delimiter (e.g., "0#5#hello0#") to safely encode and perfectly restore empty strings.