Cody

# Problem 19. Swap the first and last columns

Solution 214462

Submitted on 8 Mar 2013 by Adrian Dronca
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% A = [ 12 4 7 5 1 4]; B_correct = [ 7 4 12 4 1 5 ]; assert(isequal(swap_ends(A),B_correct))

a = 7 4 12 4 1 5

2   Pass
%% A = [ 12 7 5 4]; B_correct = [ 7 12 4 5 ]; assert(isequal(swap_ends(A),B_correct))

a = 7 12 4 5

3   Pass
%% A = [ 1 5 0 2 3 ]; B_correct = [ 3 5 0 2 1 ]; assert(isequal(swap_ends(A),B_correct))

a = 3 5 0 2 1

4   Pass
%% A = 1; B_correct = 1; assert(isequal(swap_ends(A),B_correct))

a = 1
{"ft_lang_label":"__label__en","ft_lang_prob":0.52013844,"math_prob":0.99826807,"size":679,"snap":"2019-13-2019-22","text_gpt3_token_len":271,"char_repetition_ratio":0.15111111,"word_repetition_ratio":0.11971831,"special_character_ratio":0.46686304,"punctuation_ratio":0.10204082,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9775188,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-19T19:39:52Z\",\"WARC-Record-ID\":\"<urn:uuid:f7edfb46-ccf8-40a3-9dd5-f21972826162>\",\"Content-Length\":\"72253\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b3045df0-770c-48cd-879e-9ed65abf9f60>\",\"WARC-Concurrent-To\":\"<urn:uuid:70eb18fb-3cb3-4062-aaa7-35bbb1dc6ff9>\",\"WARC-IP-Address\":\"23.13.150.165\",\"WARC-Target-URI\":\"https://kr.mathworks.com/matlabcentral/cody/problems/19-swap-the-first-and-last-columns/solutions/214462\",\"WARC-Payload-Digest\":\"sha1:6QKI6X5LIR2GE4E5HRZNYMPD4YK6H56K\",\"WARC-Block-Digest\":\"sha1:EZH4CZHFHH7OGY54JOJA2I7NN5ZSOWTU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232255092.55_warc_CC-MAIN-20190519181530-20190519203530-00104.warc.gz\"}"}