We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Zig Zag Sequence
- Discussions
Zig Zag Sequence
Zig Zag Sequence
Sort by
recency
|
1030 Discussions
|
Please Login in order to post a comment
In Python 3, you need to change lines 3, 7, and 11.
i tried in python c# java 8 output is correct still it is showing wrong answer
does anyone have idea why?
Python 3 didn't work but Java 8 worked.
Does anyone know if this answer supports Ruby? I keep getting the error:
Traceback (most recent call last): File "Solution.py", line 174, in run_custom_checker(t_obj, r_obj) File "Solution.py", line 75, in run_custom_checker system_code = code_data[t_obj.submission_language].strip() KeyError: u'ruby'
Java 8: public static void findZigZagSequence(int [] a, int n){ Arrays.sort(a); int mid = (n - 1)/2;// first modified int temp = a[mid]; a[mid] = a[n - 1]; a[n - 1] = temp;
}