You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"How could you split the problem up into sub-problems?",
27
+
"1.) Write a function that converts a single object into a dictionary that maps the path name to values. You can solve this recursively by keeping track of current path list.",
28
+
"2.) Write a function that converts a list of dictionaries into a matrix. Start by creating a list of all possible paths in any of the dictionaries. This will represent the columns."
"Consider the 4 possibilities. The object could be an array, an object, a string, or another type.",
27
+
"Think about the problem recursively. If you know how to convert any sub-data into a string, how could you use it to convert the entire data into a string?",
28
+
"If the data is a string, it's just the value surrounded by double quotes. If the data is another type, its just String(data). If the data is an array, it's the recursively stringified value of each item separated by commas. If the data is an object, it's a series of key-value pairs where each value is the recursively stringified value."
"You can access the count of parameters expected to passed into a function with \"fn.length\".",
27
+
"You can use recursion. If the length of params passed is equal to fn.length, you are done. Just pass those params to fn. Otherwise return a function that is includes the previous passed params plus the new params. The new function should contain a recursive call to curry()."
28
+
],
29
+
"solution": null,
30
+
"status": null,
31
+
"sampleTestCase": "function sum(a, b, c) { return a + b + c; }\n[[1],[2],[3]]",
"exampleTestcases": "function sum(a, b, c) { return a + b + c; }\n[[1],[2],[3]]\nfunction sum(a, b, c) { return a + b + c; }\n[[1,2],[3]]\nfunction sum(a, b, c) { return a + b + c; }\n[[],[],[1,2,3]]\nfunction life() { return 42; }\n[[]]",
0 commit comments