Count Anagrammatic Substrings
Count the number of anagrammatic substrings from one string present in another.
Input: s = "abab", p = "ab"
Output: [0, 1, 2]
Explanation: The substrings "ab", "ba", and "ab" starting at indices 0, 1, and 2 respectively are all anagrams of the string "ab".
Find the node with the highest edge score in a directed graph.
You are given a directed graph. Calculate the edge score of each node, which is the sum of the labels of all nodes that have an edge pointing to it. Return the node with the highest edge score.
Input: edges = [1,0,1,1,1]
Output: 1
Explanation: Node 1 receives incoming edge…
Two Sum
You're presented with an array of integers and a specific target value. Your task is to identify and return the indices of two numbers from the array that add up to the target. You can assume there's exactly one solution, and you can't use the same element twice. The indices can be returned in any order.
Input: nums = [14,8,22,6…