Modify the Array | Easy | GFG POTD | 24-10-24 | 2 Approaches | GFG Problem of the day |

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 2

  • @codewithuday
    @codewithuday  Месяц назад +1

    class Solution {
    public:
    vector modifyAndRearrangeArray(vector &arr) {
    // Complete the function
    vector ans;
    for(int i=0;i

  • @codewithuday
    @codewithuday  Месяц назад +1

    // Every Possible modification for this type of question
    class Solution {
    public:
    vector modifyAndRearrangeArray(vector &arr) {
    // Complete the function
    vector ans(arr.size(),0);
    for(int i = 0 ; i0) arr[j++] = i;
    return arr;

    }
    };