Cody

# Problem 32. Most nonzero elements in row

Solution 419193

Submitted on 17 Mar 2014 by Luke
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 = [ ... 1 2 0 0 0 0 0 5 0 0 2 7 0 0 0 0 6 9 3 3]; r_correct = 4; assert(isequal(fullest_row(a),r_correct))

ans = 4

2   Pass
%% a = [ ... 1 2 0 0 0 0 5 0 0 6 9 -3 2 7 0 0 0 0 0 0]; r_correct = 3; assert(isequal(fullest_row(a),r_correct))

ans = 3

3   Pass
%% a = [ ... 1 0 0 0 0 0 0 0 0 0 0 0 0 2 3]; r_correct = 5; assert(isequal(fullest_row(a),r_correct))

ans = 5

4   Pass
%% a = [ ... 0 0 0 -3 0 0]; r_correct = 4; assert(isequal(fullest_row(a),r_correct))

ans = 4

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"ft_lang_label":"__label__en","ft_lang_prob":0.5324135,"math_prob":0.99392325,"size":793,"snap":"2020-45-2020-50","text_gpt3_token_len":331,"char_repetition_ratio":0.16476552,"word_repetition_ratio":0.28994083,"special_character_ratio":0.46910468,"punctuation_ratio":0.14285715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9627029,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-29T13:49:54Z\",\"WARC-Record-ID\":\"<urn:uuid:152dbe53-04f6-44da-a530-ad5c77978206>\",\"Content-Length\":\"81989\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3d1e9458-3c49-4ca4-a4ea-ddf285f72591>\",\"WARC-Concurrent-To\":\"<urn:uuid:bd1fab78-6e70-4c50-a60e-d2cf798453a1>\",\"WARC-IP-Address\":\"23.223.252.57\",\"WARC-Target-URI\":\"https://nl.mathworks.com/matlabcentral/cody/problems/32-most-nonzero-elements-in-row/solutions/419193\",\"WARC-Payload-Digest\":\"sha1:GKN4ZP47NB7H2KCILDWH2OSQWRHZ6URG\",\"WARC-Block-Digest\":\"sha1:2PZVI26ZYVA66PIMNZYOVFKFDK4LCSRT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107904287.88_warc_CC-MAIN-20201029124628-20201029154628-00661.warc.gz\"}"}