---
title: "Discussion on \"Find the repeating and the missing value with time complexity O(n)[With Python Code].\" | Hashnode"
description: "Discussion on \"Find the repeating and the missing value with time complexity O(n)[With Python Code].\". Problem Statement: Given an array arr[ ] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which is missing. The task is to find the numbers A and B.\n\nExamples:\nInput: arr[ ] = {2, 1, 2}\nOutput: Mis..."
url: "https://hashnode.com/posts/find-the-repeating-and-the-missing-value-with-time-complexity-onwith-python-code/60c3ab611e145957d5af7955"
---

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

Discussion

# [Find the repeating and the missing value with time complexity O(n)\[With Python Code\].](https://direct2subhajit.hashnode.dev/find-the-repeating-and-the-missing-value-with-time-complexity-onwith-python-code?utm_source=hashnode&utm_medium=feed)

Problem Statement: Given an array arr\[ \] of size N, each integer from the range \[1, N\] appears exactly once except A which appears twice and B which is missing. The task is to find the numbers A and B. Examples: Input: arr\[ \] = {2, 1, 2} Output: Mis...

Jun 11, 2021 · 2 min read · direct2subhajit.hashnode.dev  
Read the article

-   [#time](https://hashnode.com/tag/time)
-   [#python](https://hashnode.com/tag/python)
-   [#data-science](https://hashnode.com/tag/data-science)

## Written by

[SUBHAJIT MONDAL](https://hashnode.com/@direct2subhajit)

@direct2subhajit · India

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

We Learn from Machine| Machine Learns from Us

Machine Learning Mentor(Intren) @REGex Software | Data Science Professional | Open for challenging roles in Data Science, Machine Learning, Artificial Intelligence, Business Intelligence &amp; Data Analytics |

## Responses 1

Markdown supported · ⌘↵ to post

[Poulami Bakshi](https://hashnode.com/@Poulami0702)

[Jun 11, 2021](https://hashnode.com/posts/find-the-repeating-and-the-missing-value-with-time-complexity-onwith-python-code/60c3ab611e145957d5af7955/comment/60c3ad1ca25fa357af840230)

_Thanks for sharing!!!!_
