필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Given two positive integers n and k, print all increasing sequences of length k such that the elements in every sequence are from first n natural numbers.

조회 수: 1 (최근 30일)
Input: k = 2, n = 3 Output: 1 2 1 3 2 3
Input: k = 5, n = 5 Output: 1 2 3 4 5
Input: k = 3, n = 5 Output: 1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5
  댓글 수: 1
John D'Errico
John D'Errico 2016년 10월 30일
편집: John D'Errico 2016년 10월 30일
But what have you tried? If all you do is post your homework problem, then all you will ever learn is how to get someone else to do your work for you. You do homework problems like this to learn something. It is the act of trying to solve those problems in MATLAB that teaches you how to program in MATLAB. Using those brain cells makes them stronger. So make an effort. When you have a question that is about a problem you have in MATLAB, then ask it. Show that you have done something, and then ask for help.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by