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
|
106 Discussions
|
Please Login in order to post a comment
This problem is incomplete for several languages. Why is it included?
this is NOT working in JAVASCRIPT
Make this exact changes to work properly in python3 otherwise it would not work irrespective of output being correct
Thank dkrakauer down the comment section!
The C# code is empty. You can't add code, only modify 3 lines. 3 lines OF WHAT!??!?!?!
I even consolidated the code into 3 lines because? maybe I can delete the comments?
SOLUTION FOR JAVA: public static void findZigZagSequence(int [] a, int n){ Arrays.sort(a); int mid = ((n + 1)/2)-1; int temp = a[mid]; a[mid] = a[n - 1]; a[n - 1] = temp;