Cody

# Problem 32. Most nonzero elements in row

Solution 1653260

Submitted on 19 Oct 2018 by Bob Tivnan
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))

b = 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 b = 2 1 2 4 r = 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))

b = 1 1 0 0 0 0 1 0 0 1 1 2 1 1 0 0 0 0 0 0 b = 2 1 4 2 0 r = 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))

b = 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 b = 1 0 0 0 2 r = 5

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

b = 0 0 0 2 0 0 b = 0 0 0 2 0 0 r = 4
{"ft_lang_label":"__label__en","ft_lang_prob":0.5069334,"math_prob":0.99956197,"size":876,"snap":"2019-43-2019-47","text_gpt3_token_len":483,"char_repetition_ratio":0.21444954,"word_repetition_ratio":0.37903225,"special_character_ratio":0.60273975,"punctuation_ratio":0.09266409,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9561864,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-14T06:36:02Z\",\"WARC-Record-ID\":\"<urn:uuid:a0a296f4-2cd2-4a73-996d-826159b089e4>\",\"Content-Length\":\"74177\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:274a8c36-9861-4448-b6fc-95eb821735e6>\",\"WARC-Concurrent-To\":\"<urn:uuid:bc49cb37-29a5-4ebb-99f0-5ed6418318d8>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://kr.mathworks.com/matlabcentral/cody/problems/32-most-nonzero-elements-in-row/solutions/1653260\",\"WARC-Payload-Digest\":\"sha1:SZQWWFUQMFSCXG7F6GZSBVWEABIN6B6S\",\"WARC-Block-Digest\":\"sha1:2O2V4GIQG4WU5UF3R3FGOOZGXD5UVCWT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496668004.65_warc_CC-MAIN-20191114053752-20191114081752-00492.warc.gz\"}"}