$1+

LeetCode problem "Two Sum" implemented with JavaScript and MaxMSP separately

I want this!

LeetCode problem "Two Sum" implemented with JavaScript and MaxMSP separately

$1+

This demo implemented the Two Sum:

https://leetcode.com/problems/two-sum/


Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.

Example:
Given nums = [2, 7, 11, 15], target = 9, 
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].


I chose JavaScript to solve it, and then re-implemented with MaxMSP too.

The MaxMSP version is totally made of Max objects without JavaScript in it.

Topic about:

  • list, zl group
  • coll, read and store


MaxMSP Source-patch attechmented.

And JavaScript source code FYI:


Find more works/projects/code/tutorials:

Website: https://floatbug.com

YouTube: https://youtube.com/avantcontra

Patreon: https://patreon.com/avantcontra

$
I want this!

You'll get MaxMSP patch.

Size
13 KB
Powered by