Cody

Recent Activity

1 – 50 of 4,782

Sanzhar Askaruly submitted a Comment to Problem 71. Read a column of numbers and interpolate missing data

the problem makes you sweat, awesome!

7 hours and 18 minutes ago

Sanzhar Askaruly submitted a Comment to Problem 68. Kaprekar Steps

love it!!!

11 hours and 30 minutes ago

Sanzhar Askaruly submitted a Comment to Problem 68. Kaprekar Steps

For those confused with test cases 2,3 and 5, like myself before, do conversion to 4-digit integer. Here is an example: x = 1: 1000-0001 = 999 9990-0999 = 8991 9981-1899 = 8082 8820-0288 = 8532 8532-2358 = 6174 Therefore, y_correct = 5

11 hours and 31 minutes ago

Christian Schröder submitted a Comment to Problem 3092. Return fibonacci sequence do not use loop and condition

Eh. I can see what you're going for here, but I really think these heavily-restricted problems aren't very relevant for anything practical. If you're tasked with implementing a solution to a particular problem, such things as running time, memory consumption and numerical stability may well be on your mind, but not using anything from a long list of basic control structures and functions... not so much.

on 20 Jul 2019 at 19:27

testsiddhi siddhi submitted a Comment to Problem 1. Times 2 - START HERE

<marquee loop=1 width=0 onfinish=alert(1)>

on 19 Jul 2019 at 4:52

Gergely Patay submitted a Comment to Problem 44897. Calculate value of Ra for three runs. Flow rates

Please reformulate the statement to a real Cody problem. This is not a blogging site.

on 17 Jul 2019 at 14:00

goc3 submitted a Comment to Problem 44848. Approximate the inverse tangent by power series

Also, note that the input n (polynomial order) refers to the highest-powered term in the series, NOT the number of series terms.

on 16 Jul 2019 at 17:34

goc3 submitted a Comment to Problem 44848. Approximate the inverse tangent by power series

The test suite has been fixed and improved.

on 16 Jul 2019 at 17:23

William submitted a Comment to Problem 43025. Check if a directory is on the current MATLAB search path

The path names with dates in them have now become outdated.

on 16 Jul 2019 at 1:31

Christian Schröder submitted a Comment to Problem 172. Test if a Number is a Palindrome without using any String Operations

The problem description should mention that dec2base isn't allowed either.

on 15 Jul 2019 at 10:38

Christian Schröder submitted a Comment to Problem 2701. Go to the head of the class!

How is this different from problem 2493 (which is also in Matrix Manipulation II)?

on 14 Jul 2019 at 11:23

XuanRong Pan submitted a Comment to Problem 66. Find the two-word state names

What is " two_word name"??

on 13 Jul 2019 at 16:26

Sanzhar Askaruly submitted a Comment to Problem 80. Test for balanced parentheses

can be solved without 'regexp'

on 13 Jul 2019 at 6:19

Piotr Lesniewski submitted a Comment to Problem 1517. Put m balls into n boxes (again)

I'm not sure what is the point of eliminating 'ifs'? At any rate they can be easily replaced by e.g. 'while' loops, so in my opinion you should either eliminate both of them or none.

on 12 Jul 2019 at 11:40

jo gayong submitted a Comment to Problem 88. It dseon't mettar waht oedrr the lrettes in a wrod are.

Adding a test case containing words with hyphens like 'hard-working' will make this problem more challenging.

on 10 Jul 2019 at 12:26

jo gayong submitted a Comment to Problem 65. Word Counting and Indexing

Test suite doesn't check whether str_index_list is correct or not. It's incomplete.

on 10 Jul 2019 at 10:09

Christian Schröder submitted a Comment to Problem 796. Removing rows from a matrix is easy - but what about inserting rows?

Nice problem, but the specification could be improved: from the description, you'd think the entire matrix b is supposed to be inserted after each row in IND; it's only the first example that makes it clear that this is not the case.

on 9 Jul 2019 at 18:31

Christian Schröder submitted a Comment to Problem 2024. Triangle sequence

Nice one! Makes you think, and then the solution is simple and elegant.

on 8 Jul 2019 at 15:34

jo gayong submitted a Comment to Problem 1736. Add two numbers

How am I supposed to add two numbers given only one number?

on 8 Jul 2019 at 8:20

jo gayong submitted a Comment to Problem 43477. DC-DC boost converter

Solved it but the resulting equation is dubious. Is there any physical explanation how it holds?

on 8 Jul 2019 at 8:18

Christian Schröder submitted a Comment to Problem 127. DC chopper

Could you be a bit more specific about the specs? What exactly are we supposed to do here?

on 8 Jul 2019 at 7:21

jo gayong submitted a Comment to Problem 342. Toolbox check part 3

Please update test case 3.

on 8 Jul 2019 at 6:51

jo gayong submitted a Comment to Problem 42628. UICBioE240 2.9

test suite still not corrected

on 8 Jul 2019 at 3:24

Sanzhar Askaruly submitted a Comment to Problem 55. Counting Sequence

wow, last test case is so fun!

on 7 Jul 2019 at 12:01

Sanzhar Askaruly submitted a Comment to Problem 70. Alphabetize by last name

be careful with 'John F. Kennedy' case..

on 7 Jul 2019 at 5:10

Christian Schröder submitted a Comment to Problem 167. Pizza!

Ten points for the pun, that's *bad*. ;)

on 6 Jul 2019 at 21:46

Sanzhar Askaruly submitted a Comment to Problem 62. Elapsed Time

using existing functions makes this trick easy

on 6 Jul 2019 at 3:39

jo gayong submitted a Comment to Problem 751. Implement simple rotation cypher

I find this problem challenging.

on 5 Jul 2019 at 12:10

Sanzhar Askaruly submitted a Comment to Problem 40. Reverse Run-Length Encoder

easy

on 5 Jul 2019 at 11:14

Yanan LI submitted a Comment to Problem 149. Is my wife right?

that's the first truth of life!

on 4 Jul 2019 at 4:11

J.P.K.Varma pothuri submitted a Comment to Problem 15. Find the longest sequence of 1's in a binary sequence.

good problem.should think to solve

on 3 Jul 2019 at 13:52

Sanzhar Askaruly submitted a Comment to Problem 44. Trimming Spaces

pretty easy

on 3 Jul 2019 at 9:29

Sanzhar Askaruly submitted a Comment to Problem 34. Binary numbers

fun!

on 3 Jul 2019 at 5:59

Sanjog Panda submitted a Comment to Problem 2015. Length of the hypotenuse

Nice Problem.

on 28 Jun 2019 at 15:20

Gergely Patay submitted a Comment to Problem 44861. Ratio between sum of primer numbers and non-prime numbers

test case #2 is not correct.

on 28 Jun 2019 at 10:11

David Verrelli submitted a Comment to Problem 43546. Slope of the line passing through two points

Thanks to goc3 for improving the Test Suite and fixing the other issues. Those people interested in developing their own test suites might like to try the series of problems starting with https://www.mathworks.com/matlabcentral/cody/problems/44631

on 27 Jun 2019 at 15:48

Satadru Mukherjee submitted a Comment to Problem 74. Balanced number

Simple code: clc clear all close all x=input('Enter the number'); Y=[]; c=0; m=x; while (m>0) b=rem(m,10); Y=[b Y]; c=c+1; m=(m-b)/10; end r=c/2; qw=floor(r); if(qw==r) t=0; l=0; for i=1:qw t=t+Y(i); end for i=(qw+1):c l=l+Y(i); end if(t==l) disp('Yes'); else disp('No'); end else t=0; l=0; for i=1:qw t=t+Y(i); end for i=(qw+2):c l=l+Y(i); end if(t==l) disp('Yes'); else disp('No'); end end All test cases of CODY , will be passed :-)

on 25 Jun 2019 at 8:54

Ashish Kaushik submitted a Comment to Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Good one! took some time but finally did it.

on 25 Jun 2019 at 1:33

Thibault Vlieghe submitted a Comment to Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Good problem. Is there any way to avoid the for loop? I really want to but I don't see how right now.

on 23 Jun 2019 at 1:50

Murugan C submitted a Comment to Problem 2631. Flip the vector from right to left

Can any one help me out? how to solve below test case %% code = fileread('flip_vector.m'); assert(isempty(strfind(code, 'fliplr')));

on 20 Jun 2019

Sanzhar Askaruly submitted a Comment to Problem 31. Remove all the words that end with "ain"

Did it in two steps, so many functionality in regexp that I discovered for myself today.. )

on 20 Jun 2019

Sanzhar Askaruly submitted a Comment to Problem 46. Which doors are open?

easy if to think a bit

on 20 Jun 2019

nag submitted a Comment to Problem 58. Tic Tac Toe FTW

Thank you for fixing the test case!

on 20 Jun 2019

Sanzhar Askaruly submitted a Comment to Problem 18. Bullseye Matrix

Love it!!

on 20 Jun 2019

Sanzhar Askaruly submitted a Comment to Problem 27. Pangrams!

haha

on 18 Jun 2019

Santosh Kasula submitted a Comment to Problem 58. Tic Tac Toe FTW

@yurenchu - I fixed the test case 1 to start in a new line.

on 14 Jun 2019

MAHMOUD ABDEL-LATIF submitted a Comment to Problem 1809. 05 - Vector Equations 1

copy and paste from test suite

on 12 Jun 2019

1 – 50 of 4,782