Problem 2631. Flip the vector from right to left
Solution Stats
Problem Comments
-
8 Comments
Try out this problem
Try Out this cody questions...
How can we do for last test case.
Can any one help me out?
how to solve below test case
%%
code = fileread('flip_vector.m');
assert(isempty(strfind(code, 'fliplr')));
Nice tricky problem
y=x(end:-1:1) I think this might help
You cannot pass the last test suite if you use the function fliplr
flipud(x')'
... didn't say anything about allowing flipud!
pretty simple
Solution Comments
-
1 Comment
Fairly straightforward even if you don't use flip or flip variants
-
1 Comment
Above average
-
1 Comment
medium-low difficulty
-
1 Comment
easy
-
1 Comment
This was intuitive for me.
-
2 Comments
tricky
good problem
-
1 Comment
A good problem!
-
1 Comment
good problem
-
1 Comment
awesome
-
1 Comment
?
-
2 Comments
y=flip(x);
for i = 1:length(y)
z(i) = y((length(y)-i+1));
end;
-
1 Comment
Fail
code = fileread('flip_vector.m');
assert(isempty(strfind(code, 'fliplr')));
Assertion failed.
Can anyone suggest what is 'flip_vector.m' here?
-
1 Comment
That looks like cheating without even an ironic comment saying it is a cheat...
Problem Recent Solvers4899
Suggested Problems
-
549 Solvers
-
Matrix with different incremental runs
312 Solvers
-
463 Solvers
-
Pernicious Anniversary Problem
774 Solvers
-
2176 Solvers
More from this Author70
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!