input
stringlengths
621
1.34k
output
sequencelengths
1
1
id
stringlengths
41
41
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [6, 94, 25, 9, 80, 67, 35, 3, 47, 4] Output:
[ "2" ]
task1089-f964d19f554641be8ad2725e5cce89de
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [174, 166, 158, 150, 142, 134, 126, 118, 110, 102, 94, 86, 78, 70, 62, 54, 46, 38] Output:
[ "1" ]
task1089-2f34e7e3a5324a1490392d8d536637b2
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [111, 107, 103, 99, 95, 91, 87, 83, 79, 75, 71, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23, 19, 15, 11, 7, 3] Output:
[ "1" ]
task1089-9020a97a3c934043ae9b7f18d2bfd397
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [134, 125, 116, 107, 98, 89, 80, 71, 62, 53, 44, 35] Output:
[ "1" ]
task1089-041087ed6cab459fbfdf7f67277c01b8
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108] Output:
[ "1" ]
task1089-5573366a31f84cadaff3ef521ae1b2e4
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [58, 57, 28, 98, 25, 53, 38, 29, 33, 11] Output:
[ "2" ]
task1089-7eb1119685ce485297fa08d041c328b8
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [12, 88, 35, 86, 62, 67, 7, 45, 9, 72] Output:
[ "2" ]
task1089-ec39e9db833f4bdb850b88d25e9df9bd
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [3, 24, 19, 66, 97, 6, 82, 81, 72, 12] Output:
[ "2" ]
task1089-1c39a94baa4046feb317fceaa97e6813
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [143, 137, 131, 125, 119, 113, 107, 101, 95, 89, 83, 77, 71, 65, 59, 53, 47, 41, 35] Output:
[ "1" ]
task1089-7ce399d9578c4e16a06ba3ddcf065e7f
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [109, 102, 95, 88, 81, 74, 67, 60, 53, 46, 39] Output:
[ "1" ]
task1089-624eb305d6ab44419dab4433f2985eab
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [17, 24, 31, 38, 45, 52, 59, 66, 73, 80, 87, 94, 101, 108] Output:
[ "1" ]
task1089-7e8e3a84b2154742b910641a1c0d8587
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113] Output:
[ "1" ]
task1089-f2e7b66560e6457593eb7b94210fa1d2
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [169, 162, 155, 148, 141, 134, 127, 120, 113, 106, 99, 92, 85, 78, 71, 64, 57, 50, 43, 36, 29, 22, 15] Output:
[ "1" ]
task1089-f509059d05a647edb090d3496fb92b65
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162] Output:
[ "1" ]
task1089-66342e271daf442bb11f97522f546b7d
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [31, 38, 72, 90, 93, 20, 45, 40, 52, 41] Output:
[ "2" ]
task1089-bbe4afbf841247cc9ea06019d18cfa6b
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [55, 68, 64, 80, 5, 87, 39, 88, 73, 45] Output:
[ "2" ]
task1089-ebaae3d562134a8f923dfb2786d636b6
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [113, 105, 97, 89, 81, 73, 65, 57, 49, 41, 33] Output:
[ "1" ]
task1089-2ad3ac62eb0b4cc79f9795db84822c5a
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [3, 75, 96, 40, 12, 21, 95, 4, 80, 85] Output:
[ "2" ]
task1089-c5431d212b9444a8b5e70bd559bdbbe7
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [62, 5, 16, 87, 73, 24, 43, 57, 6, 51] Output:
[ "2" ]
task1089-d036448777044b4592fc8bd745b17556
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [121, 117, 113, 109, 105, 101, 97, 93, 89, 85, 81, 77, 73, 69, 65, 61, 57, 53, 49, 45, 41, 37, 33, 29, 25, 21, 17, 13, 9, 5] Output:
[ "1" ]
task1089-90b91ef1524046138bcb32798c69213a
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137] Output:
[ "1" ]
task1089-49fac816d0904e368aeff83df93e36cd
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [166, 159, 152, 145, 138, 131, 124, 117, 110, 103, 96, 89, 82, 75, 68, 61, 54, 47, 40, 33, 26] Output:
[ "1" ]
task1089-f4326ca7dfb7415e84e34ce3d5a88e22
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [137, 135, 133, 131, 129, 127, 125, 123, 121, 119, 117, 115, 113, 111, 109, 107, 105, 103, 101, 99, 97, 95, 93, 91, 89, 87, 85, 83, 81, 79, 77, 75, 73, 71, 69, 67, 65, 63, 61, 59, 57, 55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25] Output:
[ "1" ]
task1089-e1845a28f0e14d89a75610520cbf8042
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108] Output:
[ "1" ]
task1089-d31b7e41c26e4adfa626c73538bf6965
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [193, 184, 175, 166, 157, 148, 139, 130, 121, 112, 103, 94, 85, 76, 67, 58, 49, 40, 31, 22] Output:
[ "1" ]
task1089-dad310f68a2b4056a6abdcd20961e29e
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135] Output:
[ "1" ]
task1089-13e323a7cec142948ee087b9246f4487
Definition: You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right Positive Example 1 - Input: [1,2,2,3] Output: 1 Positive Example 2 - Input: [6,5,4,4] Output: 1 Negative Example 1 - Input: [1,3,2] Output: 1 Negative Example 2 - Input: [1,2,4,5] Output: 2 Now complete the following example - Input: [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140] Output:
[ "1" ]
task1089-b2ce429b0caa4b3caa8d68caa6d63cd3