Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 7, 2025. It is now read-only.
/pythonPublic archive

Commita632c74

Browse files
YuvrajSHADabranhe
authored andcommitted
Added New Data-Structure program
the code will Help the user to find same elements in given two arrays by the user.Thank You!!
1 parent3df093a commita632c74

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Here You can Use this Program For Finding Same elements in two Arrays.
2+
defArray_Inter(arr1,n,arr2,m):## Here I am Function
3+
foriinrange(n) :
4+
forjinrange(m) :
5+
ifarr1[i]==arr2[j] :
6+
print(arr1[i],end=" ")
7+
break
8+
t=int(input("Test cases: "))## take test cases to be run
9+
forkinrange(t):
10+
n=int(input("Size of Array One: "))## Size of array one by the user
11+
arr1=[int(x)forxininput().split()]## take inputs from user seperated by space
12+
m=int(input("Size Of Array Two: "))
13+
arr2=[int(y)foryininput().split()]
14+
Array_Inter(arr1,n,arr2,m)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp