---
title: "Discussion on \"Segregate 0s and 1s (In-Place Sorting)\" | Hashnode"
description: "Discussion on \"Segregate 0s and 1s (In-Place Sorting)\". Learn how to segregate 0s and 1s in an array using two-pointer approach. Step-by-step explanation with O(n) time and O(1) space."
url: "https://hashnode.com/posts/segregate-0s-and-1s-in-place-sorting/69d4fca65da14bc70e4e09f3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Segregate 0s and 1s (In-Place Sorting)](https://shubhamsinghbundela.hashnode.dev/segregate-0s-and-1s-in-place-sorting?utm_source=hashnode&utm_medium=feed)

Learn how to segregate 0s and 1s in an array using two-pointer approach. Step-by-step explanation with O(n) time and O(1) space.

Apr 7 · 3 min read · shubhamsinghbundela.hashnode.dev  
Read the article

-   [#array](https://hashnode.com/tag/array)
-   [#two-pointers](https://hashnode.com/tag/two-pointers)
-   [#coding](https://hashnode.com/tag/coding)
-   [#codinginterview](https://hashnode.com/tag/codinginterview)
-   [#problem-solving-skills](https://hashnode.com/tag/problem-solving-skills)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#algorithms](https://hashnode.com/tag/algorithms)

## Written by

[Shubham Kumar Singh](https://hashnode.com/@shubhamsinghbundela)

@shubhamsinghbundela · India

  
[View profile](https://hashnode.com/@shubhamsinghbundela)

Problem Solver | Full Stack Developer

I'm Shubham (@shubhamsinghbundela), I'm a Software Engineer, a Full-stack developer, a tech enthusiast, and a technical writer here on @Hashnode. I have a strong zeal to share my acquired knowledge and I am also willing to learn from others.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
