arraysloops
Given an array of integers nums and an integer target, return the indices of the two numbers whose sum equals the target.
Each input has exactly one solution. You may not use the same element twice. Return indices in increasing order.
Think through an examplenums = [2,7,11,15]
target = 9
output = [0,1]nums = [3,2,4]
target = 6
output = [1,2]Hints unlock after you replay a failing test, so they point at what your code actually did. Run your code first.
No attempts yet. Each run is listed here with its result, and you can load its code back into the editor.
Sign in to chat with Tracy. Your code and latest run are sent only when you ask a question.
Sign in to chat with Tracy. I can help you understand your code, debug mistakes, and learn the concepts behind this problem — only when you ask.