scrimba
Prompt Engineering
Using AI Language Models for Job Search
Generate, Learn and Practice DS/Algo Problems, Part 2
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Generate, Learn and Practice DS/Algo Problems, Part 2
AboutCommentsNotes
Generate, Learn and Practice DS/Algo Problems, Part 2
Expand for more info
index.js
run
preview
console
/* 
1. Read through this explanation, and if necessary, ask for an explanation of the problem statement in a variety of tones, with less jargon, or with examples and metaphors.
2. Use AI to generate pseudocode to help you solve the problem.
3. Ask about brute force vs optomized solutions.
4. Ask ChatGPT to generate a solution and explain to you how it works.
5. Ask for other problems that can be solved using the Two Pointers pattern.

Problem Statement: Given an array of sorted integers and a target value, find two numbers in the array that add up to the target value.

Example:

Input: arr = [1, 2, 3, 4, 6], target = 6
Output: [2, 4]
Explanation: The numbers 2 and 4 add up to 6.
*/
Console
[
0
,
1
]
,
[
1
,
2
]
,
[
0
,
3
]
,
[
2
,
4
]
,
null
,
/index.html
-3:58