diff --git a/2695-array-wrapper/README.md b/2695-array-wrapper/README.md new file mode 100644 index 0000000..be94cda --- /dev/null +++ b/2695-array-wrapper/README.md @@ -0,0 +1,48 @@ +

2695. Array Wrapper

Easy


Create a class ArrayWrapper that accepts an array of integers in its constructor. This class should have two features:

+ + + +

 

+

Example 1:

+ +
+Input: nums = [[1,2],[3,4]], operation = "Add"
+Output: 10
+Explanation:
+const obj1 = new ArrayWrapper([1,2]);
+const obj2 = new ArrayWrapper([3,4]);
+obj1 + obj2; // 10
+
+ +

Example 2:

+ +
+Input: nums = [[23,98,42,70]], operation = "String"
+Output: "[23,98,42,70]"
+Explanation:
+const obj = new ArrayWrapper([23,98,42,70]);
+String(obj); // "[23,98,42,70]"
+
+ +

Example 3:

+ +
+Input: nums = [[],[]], operation = "Add"
+Output: 0
+Explanation:
+const obj1 = new ArrayWrapper([]);
+const obj2 = new ArrayWrapper([]);
+obj1 + obj2; // 0
+
+ +

 

+

Constraints:

+ +