FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-3/data-structures/Array Intersection.py at master · iCodeIN/python-3 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
iCodeIN
/
python-3
Public
forked from
AllAlgorithms/python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-3
/
data-structures
/
Array Intersection.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (14 loc) · 634 Bytes
Breadcrumbs
python-3
/
data-structures
/
Array Intersection.py
Copy path
File metadata and controls
14 lines (14 loc) · 634 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
### Here You can Use this Program For Finding Same elements in two Arrays.
def
Array_Inter
(
arr1
,
n
,
arr2
,
m
):
## Here I am Function
for
i
in
range
(
n
) :
for
j
in
range
(
m
) :
if
arr1
[
i
]
==
arr2
[
j
] :
print
(
arr1
[
i
],
end
=
" "
)
break
t
=
int
(
input
(
"Test cases: "
))
## take test cases to be run
for
k
in
range
(
t
):
n
=
int
(
input
(
"Size of Array One: "
))
## Size of array one by the user
arr1
=
[
int
(
x
)
for
x
in
input
().
split
()]
## take inputs from user seperated by space
m
=
int
(
input
(
"Size Of Array Two: "
))
arr2
=
[
int
(
y
)
for
y
in
input
().
split
()]
Array_Inter
(
arr1
,
n
,
arr2
,
m
)
Back
|
FazBrowse Home
|
New Git URL