LogIn
I don't have account.
Sponsored -55%
Tarkan Top Brand

Tarkan Portable Folding Laptop Desk with Drawer, Cup & Tablet Holder (Black)

Foldable · Anti-slip strip · 60 × 40 cm · No assembly

★★★★★ 4.2 (7,877) 1K+ bought last month
₹899 M.R.P. ₹1,999Save ₹1,100
Buy Now
Adℹ

Move all Zeros to the end of the array

HackFury
45 Views
Amazon Pay offer
Adℹ

Given an integer array nums, move all 0's to the end of the array while maintaining the relative order of the non-zero elements.

Example 1

Input: nums = [0, 1, 0, 3, 12]
Output: [1, 3, 12, 0, 0]
Explanation: All non-zeros [1,3,12] keep their order, zeros move to the end.

Example 2

Input: nums = [0, 0, 1]
Output: [1, 0, 0]

Constraints:

  • 1 <= nums.length <= 10^5

  • -10^9 <= nums[i] <= 10^9

Brute Force Approach (Using an Extra Array)

When solving problems like Move all zeros to the end of an array, the brute force idea is often the simplest way to start. It may not be the most optimal, but it's an excellent first step toward understanding the problem's mechanics.

Idea : The basic idea is straightforward:

  • Create a new temporary array.

  • Copy all non-zero elements into it in the same order they appear.

  • After that, fill the remaining positions with zeros.

  • Finally, copy everything back into the original array.

This ensures that:

  • All non-zero values maintain their relative order (stability).

  • All zeros move neatly to the end.

  • The logic is easy to visualize and debug.

#include <iostream>
#include <vector>
using namespace std;

void moveZeroesBruteForce(vector<int>& nums) {
    int n = nums.size();
    vector<int> temp(n);
    int index = 0;
    for (int i = 0; i < n; i++) {
        if (nums[i] != 0) {
            temp[index++] = nums[i];
        }
    }
    while (index < n) {
        temp[index++] = 0;
    }
    for (int i = 0; i < n; i++) {
        nums[i] = temp[i];
    }
}

int main() {
    vector<int> nums = {0, 1, 0, 3, 12};
    moveZeroesBruteForce(nums);

    cout << "After moving zeroes: ";
    for (int num : nums) {
        cout << num << " ";
    }
    cout << endl;
    return 0;
}
public class MoveZeroesBruteForce {
    static void moveZeroesBruteForce(int[] nums) {
        int n = nums.length;
        int[] temp = new int[n];
        int index = 0;
        for (int i = 0; i < n; i++) {
            if (nums[i] != 0) {
                temp[index++] = nums[i];
            }
        }
        while (index < n) {
            temp[index++] = 0;
        }
        for (int i = 0; i < n; i++) {
            nums[i] = temp[i];
        }
    }
    public static void main(String[] args) {
        int[] nums = {0, 1, 0, 3, 12};
        moveZeroesBruteForce(nums);
        System.out.print("After moving zeroes: ");
        for (int num : nums) {
            System.out.print(num + " ");
        }
    }
}
using System;

public class MoveZeroes {
    public static void MoveZeroesBruteForce(int[] nums) {
        int n = nums.Length;
        int[] temp = new int[n];
        int index = 0;
        for (int i = 0; i < n; i++) {
            if (nums[i] != 0) {
                temp[index++] = nums[i];
            }
        }
        while (index < n) {
            temp[index++] = 0;
        }
        for (int i = 0; i < n; i++) {
            nums[i] = temp[i];
        }
    }

    public static void Main() {
        int[] nums = {0, 1, 0, 3, 12};
        MoveZeroesBruteForce(nums);
        Console.Write("After moving zeroes: ");
        foreach (int num in nums) {
            Console.Write(num + " ");
        }
        Console.WriteLine();
    }
}
def move_zeroes_brute_force(nums):
    n = len(nums)
    temp = [0] * n
    index = 0
    for i in range(n):
        if nums[i] != 0:
            temp[index] = nums[i]
            index += 1
    while index < n:
        temp[index] = 0
        index += 1
    for i in range(n):
        nums[i] = temp[i]

if __name__ == "__main__":
    nums = [0, 1, 0, 3, 12]
    move_zeroes_brute_force(nums)
    print("After moving zeroes:", nums)
After moving zeroes: 1 3 12 0 0

Complexity Analysis

  • Time Complexity O(n) — Each element is visited once and copied once
  • Space Complexity O(n) — Because we use a temporary array

Better Approach: Shifting In-Place (with One Extra Pass)

After understanding the brute force method, the next step is to optimize space usage. The idea here is simple: instead of creating a new array, we shift all non-zero elements in-place toward the beginning of the same array then fill the rest with zeros.

This approach eliminates the need for extra memory while still keeping the logic easy to follow.

  • Maintain a pointer index that always indicates the next position where a non-zero should go.

  • Traverse the array from start to end:

    • Whenever you find a non-zero, place it at nums[index] and increment index.

    • Ignore zeros during this phase — they’ll be handled later.

  • Once the traversal is done, fill the rest of the array with zeros, starting from index to the end.


#include <iostream>
#include <vector>
using namespace std;

void moveZeroesBetter(vector<int>& nums) {
    int index = 0;
    for (int num : nums) {
        if (num != 0) {
            nums[index++] = num;
        }
    }
    while (index < nums.size()) {
        nums[index++] = 0;
    }
}

int main() {
    vector<int> nums = {0, 1, 0, 3, 12};
    moveZeroesBetter(nums);
    cout << "After moving zeroes: ";
    for (int num : nums) {
        cout << num << " ";
    }
    cout << endl;
    return 0;
}

public class MoveZeroesBetter {
    public static void moveZeroesBetter(int[] nums) {
        int index = 0;
            if (num != 0) {
                nums[index++] = num;
            }
        }
        while (index < nums.length) {
            nums[index++] = 0;
        }
    }
    public static void main(String[] args) {
        int[] nums = {0, 1, 0, 3, 12};
        moveZeroesBetter(nums);

        System.out.print("After moving zeroes: ");
        for (int num : nums) {
            System.out.print(num + " ");
        }
    }
}

using System;

public class MoveZeroesBetter {
    public static void MoveZeroesBetterMethod(int[] nums) {
        int index = 0;
        foreach (int num in nums) {
            if (num != 0) {
                nums[index++] = num;
            }
        }
        while (index < nums.Length) {
            nums[index++] = 0;
        }
    }

    public static void Main() {
        int[] nums = {0, 1, 0, 3, 12};
        MoveZeroesBetterMethod(nums);
        Console.Write("After moving zeroes: ");
        foreach (int num in nums) {
            Console.Write(num + " ");
        }
        Console.WriteLine();
    }
}

def move_zeroes_better(nums):
    index = 0
    for num in nums:
        if num != 0:
            nums[index] = num
            index += 1
        nums[index] = 0
        index += 1

if __name__ == "__main__":
    nums = [0, 1, 0, 3, 12]
    move_zeroes_better(nums)
    print("After moving zeroes:", nums)
After moving zeroes: 1 3 12 0 0

Complexity Analysis

  • Time Complexity O(n), Two linear passes: one to rearrange, one to fill zeros
  • Space Complexity O(1), In-place, no extra array required

Optimal Approach: Two-Pointer Swap (Single Pass)

This is the most efficient and elegant solution for moving all zeros to the end of an array without losing the order of non-zero elements and doing it in just one pass.

The goal is to bring all non-zero elements to the front as we traverse the array, while zeros automatically fall toward the back.

To do that, we use two pointers:

  • slow : marks the position where the next non-zero should be placed.

  • fast : scans through every element in the array.

At each step:

  • If nums[fast] != 0, we swap nums[slow] and nums[fast], then increment slow.

  • This ensures that all non-zero elements are compacted toward the beginning, maintaining their relative order.

By the time we finish traversing, all zeros are automatically at the end.

Step-by-Step Example

nums = [0, 1, 0, 3, 12]
Step fast slow Action Result
0 0 0 nums[0] = 0 : skip [0, 1, 0, 3, 12]
1 1 0 nums[1] = 1 : swap(nums[1], nums[0]) -> slow++ [1, 0, 0, 3, 12]
2 2 1 nums[2] = 0 : skip [1, 0, 0, 3, 12]
3 3 1 nums[3] = 3 : swap(nums[3], nums[1]) -> slow++ [1, 3, 0, 0, 12]
4 4 2 nums[4] = 12 : swap(nums[4], nums[2]) -> slow++ [1, 3, 12, 0, 0]

#include <iostream>
#include <vector>
using namespace std;

void moveZeroesOptimal(vector<int>& nums) {
    int slow = 0;
    for (int fast = 0; fast < nums.size(); fast++) {
        if (nums[fast] != 0) {
            swap(nums[slow], nums[fast]);
            slow++;
        }
    }
}

int main() {
    vector<int> nums = {0, 1, 0, 3, 12};
    moveZeroesOptimal(nums);

    cout << "After moving zeroes: ";
    for (int num : nums) {
        cout << num << " ";
    }
    cout << endl;
    return 0;
}

public class MoveZeroesOptimal {
    static void moveZeroesOptimal(int[] nums) {
        int slow = 0;
        for (int fast = 0; fast < nums.length; fast++) {
            if (nums[fast] != 0) {
                int temp = nums[slow];
                nums[slow] = nums[fast];
                nums[fast] = temp;
                slow++;
            }
        }
    }

    public static void main(String[] args) {
        int[] nums = {0, 1, 0, 3, 12};
        moveZeroesOptimal(nums);

        System.out.print("After moving zeroes: ");
        for (int num : nums) {
            System.out.print(num + " ");
        }
    }
}

using System;

public class MoveZeroesOptimal {
    public static void MoveZeroesOptimalMethod(int[] nums) {
        int slow = 0;
        for (int fast = 0; fast < nums.Length; fast++) {
            if (nums[fast] != 0) {
                int temp = nums[slow];
                nums[slow] = nums[fast];
                nums[fast] = temp;
                slow++;
            }
        }
    }

    public static void Main() {
        int[] nums = {0, 1, 0, 3, 12};
        MoveZeroesOptimalMethod(nums);

        Console.Write("After moving zeroes: ");
        foreach (int num in nums) {
            Console.Write(num + " ");
        }
        Console.WriteLine();
    }
}

def move_zeroes_optimal(nums):
    slow = 0
    for fast in range(len(nums)):
        if nums[fast] != 0:
            nums[slow], nums[fast] = nums[fast], nums[slow]
            slow += 1

if __name__ == "__main__":
    nums = [0, 1, 0, 3, 12]
    move_zeroes_optimal(nums)
    print("After moving zeroes:", nums)
After moving zeroes: 1 3 12 0 0

Complexity Analysis

  • Time Complexity O(n) Single linear scan through the array
  • Space Complexity O(1) In-place; only uses two pointers

Complexity Comparison of All Approaches

Approach Time Space Passes Notes
Brute Force (Extra Array) O(n) O(n) 2 Simple, easy to start
Better (In-Place, Extra Pass) O(n) O(1) 2 Memory-efficient
Optimal (Two Pointers) O(n) O(1) 1 Best overall performance
Responses (0)

Write a response

CommentHide Comments

No Comments yet.

"},"4":{"id":4,"name":"ZEBRONICS Blanc mouse ad","otherData":"{}","contentFormat":2,"content":"
Sponsored -53%
Zebronics #1 Best Seller

ZEBRONICS Blanc Slim Wireless Mouse — Rechargeable, BT + 2.4GHz (Black)

Up to 1600 DPI · Silent clicks · 63g · Multicolor LED

★★★★★ 4.0 (9,512) 5K+ bought last month
₹376 M.R.P. ₹799Save ₹423
Buy Now
"},"2":{"id":2,"name":"Crousal Ads","otherData":"{}","contentFormat":2,"content":"
Sponsored -34%
iQOO Amazon's Choice

iQOO Z10 Lite 5G — Cyber Green, 4GB RAM, 128GB Storage

Dimensity 6300 · 50MP Sony AI Camera · 6000 mAh · IP64

★★★★★ 4.0 (2,052) 500+ bought last month
₹18,997 M.R.P. ₹28,999Save ₹10,002
Buy Now
"},"1":{"id":1,"name":"Banner Ads","otherData":"{}","contentFormat":2,"content":"\n
\n \n \n \"Amazon\n \n
"}}},"blogDetails":{"isWriter":false,"likes":0,"isLikedByUser":false,"tagIds":[17,133,169],"tags":[{"id":17,"name":"Array","maskingName":"array","isFeatured":true},{"id":133,"name":"Coding Problems","maskingName":"coding-problems","isFeatured":true},{"id":169,"name":"Two Pointes","maskingName":"two-pointers","isFeatured":true}],"comments":[],"bookmark":{"isBookmarked":false,"count":0},"author":{"userId":"MjlfNF84LVs0XTJuLXRDX0FOZ2VfX0l0","name":"HackFury"},"viewCount":44,"showBannerImage":false,"seoTags":null,"content":"

Given an integer array nums, move all 0's to the end of the array while maintaining the relative order of the non-zero elements.

\n

Example 1

\n
Input: nums = [0, 1, 0, 3, 12]\nOutput: [1, 3, 12, 0, 0]\nExplanation: All non-zeros [1,3,12] keep their order, zeros move to the end.\n
\n

Example 2

\n
Input: nums = [0, 0, 1]\nOutput: [1, 0, 0]\n
\n

Constraints:

\n\n

Brute Force Approach (Using an Extra Array)

\n

When solving problems like Move all zeros to the end of an array, the brute force idea is often the simplest way to start.\nIt may not be the most optimal, but it's an excellent first step toward understanding the problem's mechanics.

\n

Idea :\nThe basic idea is straightforward:

\n\n

This ensures that:

\n\n
#include <iostream>\n#include <vector>\nusing namespace std;\n\nvoid moveZeroesBruteForce(vector<int>& nums) {\n    int n = nums.size();\n    vector<int> temp(n);\n    int index = 0;\n    for (int i = 0; i < n; i++) {\n        if (nums[i] != 0) {\n            temp[index++] = nums[i];\n        }\n    }\n    while (index < n) {\n        temp[index++] = 0;\n    }\n    for (int i = 0; i < n; i++) {\n        nums[i] = temp[i];\n    }\n}\n\nint main() {\n    vector<int> nums = {0, 1, 0, 3, 12};\n    moveZeroesBruteForce(nums);\n\n    cout << \"After moving zeroes: \";\n    for (int num : nums) {\n        cout << num << \" \";\n    }\n    cout << endl;\n    return 0;\n}\n
public class MoveZeroesBruteForce {\n    static void moveZeroesBruteForce(int[] nums) {\n        int n = nums.length;\n        int[] temp = new int[n];\n        int index = 0;\n        for (int i = 0; i < n; i++) {\n            if (nums[i] != 0) {\n                temp[index++] = nums[i];\n            }\n        }\n        while (index < n) {\n            temp[index++] = 0;\n        }\n        for (int i = 0; i < n; i++) {\n            nums[i] = temp[i];\n        }\n    }\n    public static void main(String[] args) {\n        int[] nums = {0, 1, 0, 3, 12};\n        moveZeroesBruteForce(nums);\n        System.out.print(\"After moving zeroes: \");\n        for (int num : nums) {\n            System.out.print(num + \" \");\n        }\n    }\n}\n
using System;\n\npublic class MoveZeroes {\n    public static void MoveZeroesBruteForce(int[] nums) {\n        int n = nums.Length;\n        int[] temp = new int[n];\n        int index = 0;\n        for (int i = 0; i < n; i++) {\n            if (nums[i] != 0) {\n                temp[index++] = nums[i];\n            }\n        }\n        while (index < n) {\n            temp[index++] = 0;\n        }\n        for (int i = 0; i < n; i++) {\n            nums[i] = temp[i];\n        }\n    }\n\n    public static void Main() {\n        int[] nums = {0, 1, 0, 3, 12};\n        MoveZeroesBruteForce(nums);\n        Console.Write(\"After moving zeroes: \");\n        foreach (int num in nums) {\n            Console.Write(num + \" \");\n        }\n        Console.WriteLine();\n    }\n}\n
def move_zeroes_brute_force(nums):\n    n = len(nums)\n    temp = [0] * n\n    index = 0\n    for i in range(n):\n        if nums[i] != 0:\n            temp[index] = nums[i]\n            index += 1\n    while index < n:\n        temp[index] = 0\n        index += 1\n    for i in range(n):\n        nums[i] = temp[i]\n\nif __name__ == \"__main__\":\n    nums = [0, 1, 0, 3, 12]\n    move_zeroes_brute_force(nums)\n    print(\"After moving zeroes:\", nums)\n
\n
After moving zeroes: 1 3 12 0 0\n
\n

Complexity Analysis

\n\n

Better Approach: Shifting In-Place (with One Extra Pass)

\n

After understanding the brute force method, the next step is to optimize space usage.\nThe idea here is simple: instead of creating a new array, we shift all non-zero elements in-place toward the beginning of the same array\nthen fill the rest with zeros.

\n

This approach eliminates the need for extra memory while still keeping the logic easy to follow.

\n\n
\n#include <iostream>\n#include <vector>\nusing namespace std;\n\nvoid moveZeroesBetter(vector<int>& nums) {\n    int index = 0;\n    for (int num : nums) {\n        if (num != 0) {\n            nums[index++] = num;\n        }\n    }\n    while (index < nums.size()) {\n        nums[index++] = 0;\n    }\n}\n\nint main() {\n    vector<int> nums = {0, 1, 0, 3, 12};\n    moveZeroesBetter(nums);\n    cout << \"After moving zeroes: \";\n    for (int num : nums) {\n        cout << num << \" \";\n    }\n    cout << endl;\n    return 0;\n}\n
\npublic class MoveZeroesBetter {\n    public static void moveZeroesBetter(int[] nums) {\n        int index = 0;\n            if (num != 0) {\n                nums[index++] = num;\n            }\n        }\n        while (index < nums.length) {\n            nums[index++] = 0;\n        }\n    }\n    public static void main(String[] args) {\n        int[] nums = {0, 1, 0, 3, 12};\n        moveZeroesBetter(nums);\n\n        System.out.print(\"After moving zeroes: \");\n        for (int num : nums) {\n            System.out.print(num + \" \");\n        }\n    }\n}\n
\nusing System;\n\npublic class MoveZeroesBetter {\n    public static void MoveZeroesBetterMethod(int[] nums) {\n        int index = 0;\n        foreach (int num in nums) {\n            if (num != 0) {\n                nums[index++] = num;\n            }\n        }\n        while (index < nums.Length) {\n            nums[index++] = 0;\n        }\n    }\n\n    public static void Main() {\n        int[] nums = {0, 1, 0, 3, 12};\n        MoveZeroesBetterMethod(nums);\n        Console.Write(\"After moving zeroes: \");\n        foreach (int num in nums) {\n            Console.Write(num + \" \");\n        }\n        Console.WriteLine();\n    }\n}\n
\ndef move_zeroes_better(nums):\n    index = 0\n    for num in nums:\n        if num != 0:\n            nums[index] = num\n            index += 1\n        nums[index] = 0\n        index += 1\n\nif __name__ == \"__main__\":\n    nums = [0, 1, 0, 3, 12]\n    move_zeroes_better(nums)\n    print(\"After moving zeroes:\", nums)\n
\n
After moving zeroes: 1 3 12 0 0\n
\n

Complexity Analysis

\n\n

Optimal Approach: Two-Pointer Swap (Single Pass)

\n

This is the most efficient and elegant solution for moving all zeros to the end of an array without losing the order of non-zero elements\nand doing it in just one pass.

\n

The goal is to bring all non-zero elements to the front as we traverse the array, while zeros automatically fall toward the back.

\n

To do that, we use two pointers:

\n\n

At each step:

\n\n

By the time we finish traversing, all zeros are automatically at the end.

\n

Step-by-Step Example

\n
nums = [0, 1, 0, 3, 12]\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
StepfastslowActionResult
000nums[0] = 0 : skip[0, 1, 0, 3, 12]
110nums[1] = 1 : swap(nums[1], nums[0]) -> slow++[1, 0, 0, 3, 12]
221nums[2] = 0 : skip[1, 0, 0, 3, 12]
331nums[3] = 3 : swap(nums[3], nums[1]) -> slow++[1, 3, 0, 0, 12]
442nums[4] = 12 : swap(nums[4], nums[2]) -> slow++[1, 3, 12, 0, 0]
\n
\n#include <iostream>\n#include <vector>\nusing namespace std;\n\nvoid moveZeroesOptimal(vector<int>& nums) {\n    int slow = 0;\n    for (int fast = 0; fast < nums.size(); fast++) {\n        if (nums[fast] != 0) {\n            swap(nums[slow], nums[fast]);\n            slow++;\n        }\n    }\n}\n\nint main() {\n    vector<int> nums = {0, 1, 0, 3, 12};\n    moveZeroesOptimal(nums);\n\n    cout << \"After moving zeroes: \";\n    for (int num : nums) {\n        cout << num << \" \";\n    }\n    cout << endl;\n    return 0;\n}\n
\npublic class MoveZeroesOptimal {\n    static void moveZeroesOptimal(int[] nums) {\n        int slow = 0;\n        for (int fast = 0; fast < nums.length; fast++) {\n            if (nums[fast] != 0) {\n                int temp = nums[slow];\n                nums[slow] = nums[fast];\n                nums[fast] = temp;\n                slow++;\n            }\n        }\n    }\n\n    public static void main(String[] args) {\n        int[] nums = {0, 1, 0, 3, 12};\n        moveZeroesOptimal(nums);\n\n        System.out.print(\"After moving zeroes: \");\n        for (int num : nums) {\n            System.out.print(num + \" \");\n        }\n    }\n}\n
\nusing System;\n\npublic class MoveZeroesOptimal {\n    public static void MoveZeroesOptimalMethod(int[] nums) {\n        int slow = 0;\n        for (int fast = 0; fast < nums.Length; fast++) {\n            if (nums[fast] != 0) {\n                int temp = nums[slow];\n                nums[slow] = nums[fast];\n                nums[fast] = temp;\n                slow++;\n            }\n        }\n    }\n\n    public static void Main() {\n        int[] nums = {0, 1, 0, 3, 12};\n        MoveZeroesOptimalMethod(nums);\n\n        Console.Write(\"After moving zeroes: \");\n        foreach (int num in nums) {\n            Console.Write(num + \" \");\n        }\n        Console.WriteLine();\n    }\n}\n
\ndef move_zeroes_optimal(nums):\n    slow = 0\n    for fast in range(len(nums)):\n        if nums[fast] != 0:\n            nums[slow], nums[fast] = nums[fast], nums[slow]\n            slow += 1\n\nif __name__ == \"__main__\":\n    nums = [0, 1, 0, 3, 12]\n    move_zeroes_optimal(nums)\n    print(\"After moving zeroes:\", nums)\n
\n
After moving zeroes: 1 3 12 0 0\n
\n

Complexity Analysis

\n\n

Complexity Comparison of All Approaches

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ApproachTimeSpacePassesNotes
Brute Force (Extra Array)O(n)O(n)2Simple, easy to start
Better (In-Place, Extra Pass)O(n)O(1)2Memory-efficient
Optimal (Two Pointers)O(n)O(1)1Best overall performance
","categoryId":177,"subCategoryId":177,"contentFormat":5,"blogId":23,"userId":"MjlfNF84LVs0XTJuLXRDX0FOZ2VfX0l0","title":"Move all Zeros to the end of the array","url":"move-all-zeros-to-the-end-of-the-array","bannerImage":"","seoDescription":"","generatedOn":"2025-10-05T05:54:36","updatedOn":"2025-10-05T05:54:36"},"popularContents":[{"id":213,"title":"Amazon SDE II Interview Experience (Bangalore, Selected) ~ Aug 2026","url":"amazon-sde-ii-interview-experience-bangalore-selected-aug-2026","description":null,"seoDescription":"Amazon SDE II interview experience from Bangalore covering 4 rounds, DSA, LLD, system design, Leadership Principles, coding questions and selection.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651978Z","viewCount":0},{"id":35,"title":"Cursor vs Copilot : Which AI Coding Assistant Wins in 2025?","url":"cursor-vs-copilot-which-ai-coding-assistant-truly-wins-in-2025","description":null,"seoDescription":"Compare Cursor vs GitHub Copilot on speed, context awareness, multi-file support, pricing and code quality to choose the best AI coding assistant for developers","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651827Z","viewCount":0},{"id":172,"title":"Google L4 Software Engineer III interview experience | Selected","url":"google-l4-software-engineer-iii-interview-experience-selected","description":null,"seoDescription":"Google L4 Software Engineer III interview experience with API design, Googlyness, route matching, graph coding rounds, follow-up questions and tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651946Z","viewCount":0},{"id":153,"title":"Visa Software Engineer 1 (SDE-1) Interview Experience | CodeSignal OA + Graph-Based Technical Rounds","url":"visa-software-engineer-1-sde-1-interview-experience-codesignal-oa-graph-based-technical-rounds","description":null,"seoDescription":" Ace your Visa SDE-1 interview with this complete interview experience covering CodeSignal OA, graph coding rounds, hiring manager questions and tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651925Z","viewCount":0},{"id":139,"title":"Blinkit (Eternal) SDE-1 Interview Experience (June 2026) – Offer Received","url":"blinkit-eternal-sde-1-interview-experience-june-2026-offer-received","description":null,"seoDescription":"Blinkit SDE-1 interview experience with a 30 LPA offer. Covers House Robber DP, ticket booking system design, culture fit round and tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651906Z","viewCount":0},{"id":34,"title":"System Design Deep Dive: 25 Essential Interview Questions","url":"system-design-deep-dive-25-essential-interview-questions","description":null,"seoDescription":"","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651786Z","viewCount":0},{"id":130,"title":"Rippling SDE-2 Interview Experience (4+ Years Experience) | Offer Received | Coding, LLD & System Design","url":"rippling-sde-2-interview-experience-4-years-experience-offer-received-coding-lld-system-design","description":null,"seoDescription":"Detailed Rippling SDE-2 interview experience with complete 5 rounds, coding questions, rules engine design, system design and preparation tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651889Z","viewCount":0},{"id":166,"title":"System Design Interview – BIGGEST Mistakes to Avoid","url":"system-design-interview-biggest-mistakes-to-avoid","description":null,"seoDescription":"Learn the biggest mistakes to avoid in a system design interview, from unclear requirements to poor trade-off analysis. Includes real-world cases, advanced insights and examples to help you ace your next system design interview.","contentType":2,"generatedOn":"2026-10-15T14:07:07.9645896Z","viewCount":0},{"id":163,"title":"Top 50 SQL Interview Questions and Answers (Beginner to Intermediate)","url":"top-sql-interview-questions-and-answers-beginner-to-intermediate","description":null,"seoDescription":"Top 50 SQL Interview Questions and Answers (Beginner to Intermediate). Top SQL Interview Questions for fresher. Frequently asked SQL interview questions with answers","contentType":2,"generatedOn":"2026-10-15T14:07:07.964584Z","viewCount":0},{"id":173,"title":"Uber SDE-2 Interview Experience : LLD, HLD, DSA & Hiring Manager Round","url":"uber-sde-2-interview-experience-lld-hld-dsa-hiring-manager-round","description":null,"seoDescription":"Read a real Uber SDE-2 interview experience covering DSA, low-level design, high-level system design, behavioral rounds, hiring freeze and key takeaways.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9651962Z","viewCount":0}],"latestContents":[{"id":219,"title":"6 Tools That Made My Life Easier as a Software Engineer","url":"6-tools-that-made-my-life-easier-as-a-software-engineer","description":null,"seoDescription":"The 6 developer tools I use daily as a software engineer: Git, VS Code, Docker, Postman, Chrome DevTools, and AI assistants, with real tips, mistakes, and trade","contentType":5,"generatedOn":"2026-10-15T14:07:07.963222Z","viewCount":0},{"id":218,"title":"When Should a Business Use Multiple AI Agents Instead of One?","url":"when-should-a-business-use-multiple-ai-agents-instead-of-one","description":null,"seoDescription":"Single agent or multi-agent AI? Learn the 4 signals that justify splitting agents by knowledge, permissions, and risk, plus routing and handoff tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.963229Z","viewCount":0},{"id":216,"title":"AI in Clinical Trials Market Estimated to Experience a Hike in Growth by 2035","url":"ai-in-clinical-trials-market-estimated-to-experience-a-hike-in-growth-by-2035","description":null,"seoDescription":"The exclusive information about market dynamics serves as a valuable guide to predict economic scenarios and initiatives taken to enhance future growth. Our mar","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632305Z","viewCount":0},{"id":217,"title":"AI in Clinical Trials Market Estimated to Experience a Hike in Growth by 2035","url":"ai-in-clinical-trials-market-estimated-to-experience-a-hike-in-growth-by-2035","description":null,"seoDescription":"The exclusive information about market dynamics serves as a valuable guide to predict economic scenarios and initiatives taken to enhance future growth. Our mar","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632319Z","viewCount":0},{"id":215,"title":"What Happens When an AI Agent Doesn't Know the Answer?","url":"what-happens-when-an-ai-agent-doesnt-know-the-answer","description":null,"seoDescription":"Most AI agents fail quietly. They guess instead of saying \"I don't know.\" Here's how to design better fallback and human-handoff behavior.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632333Z","viewCount":0},{"id":214,"title":"Greedy Algorithms Explained: How They Work, When They Fail and How to Use Them","url":"greedy-algorithms-explained-how-they-work-when-they-fail-and-how-to-use-them","description":null,"seoDescription":"Learn greedy algorithms step by step with C# code Dijkstra, Huffman coding, knapsack and MSTs plus when greedy fails and how to prove it's correct","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632349Z","viewCount":0},{"id":213,"title":"Amazon SDE II Interview Experience (Bangalore, Selected) ~ Aug 2026","url":"amazon-sde-ii-interview-experience-bangalore-selected-aug-2026","description":null,"seoDescription":"Amazon SDE II interview experience from Bangalore covering 4 rounds, DSA, LLD, system design, Leadership Principles, coding questions and selection.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632362Z","viewCount":0},{"id":212,"title":"How to Get 10x Better AI Answers Without Writing Better Prompts : 10 Proven Techniques","url":"how-to-get-10x-better-ai-answers-without-writing-better-prompts-10-proven-techniques","description":null,"seoDescription":"Get better AI answers without complex prompts. Learn 10 practical techniques using context, examples, tools, feedback, and verification.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632377Z","viewCount":0},{"id":211,"title":"I Interviewed for a Microsoft SDE I Role. Here's Everything That Happened.","url":"i-interviewed-for-a-microsoft-sde-i-role-heres-everything-that-happened","description":null,"seoDescription":"My real Microsoft SDE I interview experience, all 4 rounds, the exact DSA problems with fully tested solutions, the WhatsApp system design round","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632389Z","viewCount":0},{"id":140,"title":"PolicyBazaar Software Development Engineer (SDE) Interview Experience | DSA, Core CS & System Design","url":"policybazaar-software-development-engineer-sde-interview-experience-dsa-core-cs-system-design","description":null,"seoDescription":"Detailed PolicyBazaar SDE interview experience covering 3 rounds: DSA coding, core CS assessment and system design with key learnings and insights.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9632755Z","viewCount":0}],"relatedContents":[{"id":207,"title":"How to Find the Right View of a Binary Tree","url":"right-view-of-a-binary-tree","description":null,"seoDescription":"Learn how to find the right view of a binary tree using DFS and BFS, with examples, code, complexity analysis and coding interview tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.969248Z","viewCount":0},{"id":206,"title":"Left View of a Binary Tree: DFS and BFS Approaches Explained","url":"left-view-of-a-binary-tree","description":null,"seoDescription":"Learn how to find the left view of a binary tree using DFS and BFS, with examples, code, complexity analysis, common mistakes and interview tips.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9692535Z","viewCount":0},{"id":205,"title":"Top View of a Binary Tree Using BFS and DFS | Complete Guide","url":"top-view-of-a-binary-tree","description":null,"seoDescription":"Learn how to find the top view of a binary tree using DFS and BFS with step-by-step explanations, examples, code, complexity analysis and interview insights.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9692553Z","viewCount":0},{"id":201,"title":"Bottom View of a Binary Tree: DFS vs BFS Approach","url":"bottom-view-of-a-binary-tree-dfs-vs-bfs-approach","description":null,"seoDescription":"Learn to find the bottom view of a binary tree using horizontal distance. Compares a buggy DFS attempt, a fixed DFS and the optimal BFS solution in Java.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9692567Z","viewCount":0},{"id":200,"title":" Longest Playlist With No Repeated Songs : Brute Force to Optimal","url":"longest-playlist-with-no-repeated-songs-brute-force-to-optimal","description":null,"seoDescription":"Find the longest playlist with no repeated songs using brute force, HashSet, and HashMap sliding window techniques, with Java code and dry runs.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9692981Z","viewCount":0},{"id":90,"title":"Contain Virus : Deep, Intuitive & Fully Explained Guide","url":"contain-virus-deep-intuitive-fully-explained-guide","description":null,"seoDescription":"Contain Virus problem explained with DFS + greedy approach, step-by-step simulation, examples and optimized solutions for coding interviews.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9693009Z","viewCount":0},{"id":37,"title":"Find the repeating and missing numbers","url":"find-the-repeating-and-missing-numbers","description":null,"seoDescription":"Find the repeating and missing numbers in an array from 1..n using brute force, hashmap, math and XOR, step-by-step explained with real-world use cases.","contentType":5,"generatedOn":"2026-10-15T14:07:07.9693027Z","viewCount":0},{"id":27,"title":"4 Sum | Find Quads that add up to a target value","url":"4-sum-find-quads-that-add-up-to-a-target-value","description":null,"seoDescription":"","contentType":5,"generatedOn":"2026-10-15T14:07:07.969309Z","viewCount":0},{"id":26,"title":"Top 50 Most Frequently Asked String Coding Problems (Interview Preparation )","url":"top-50-most-frequently-asked-string-coding-problems-interview-preparation","description":null,"seoDescription":"","contentType":5,"generatedOn":"2026-10-15T14:07:07.9693106Z","viewCount":0},{"id":25,"title":"Intersection of Two Sorted Arrays","url":"intersection-of-two-sorted-arrays","description":null,"seoDescription":"","contentType":5,"generatedOn":"2026-10-15T14:07:07.9693127Z","viewCount":0}]}}},"source":{"isMobile":false}}; window.__CLIENT_RENDER__ = false;