Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F first-contributions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 322
    • Merge requests 322
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • First Contributions
  • first-contributions
  • Merge requests
  • !20679

New Python file added to check for Duplicates

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/vineetnayak777/vineet into master 5 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: vineetnayak777

Compare
  • master (base)

and
  • latest version
    f73c590b
    1 commit, 2 years ago

1 file
+ 25
- 0

    Preferences

    File browser
    Compare changes
dup.py 0 → 100644
+ 25
- 0
  • View file @ f73c590b

print("Enter N")
n=int(input())
flag=0
flag1=0
num=[]
for i in range(n):
num.append(int(input()))
dic={}
for i in num:
try:
dic[i]+=1
except:
dic[i]=1
for key, value in dic.items():
if(value!=1):
if(flag==0):
print("Duplicate Numbers")
flag=flag+1
print(key)
else:
if(flag1==0):
print("Non Duplicate Numbers")
flag1=flag1+1
print(key)
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
cla signed
1
cla signed
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: root/metaseq!272
Source branch: github/fork/vineetnayak777/vineet

Menu

Explore Projects Groups Snippets