Solving Publicis Sapient Python Data Engineer Interview Question | Second Round Interview |

preview_player
Показать описание

I have prepared many courses on Azure Data Engineering

1. Build Azure End to. End Project

2. Build Delta Lake project

3. Master in Azure Data Factory with ETL Project and PowerBi

4. Master in Python

Check out my courses on Azure Data Engineering

hastags
tags

#dataengineer #interviewquestions #python
#hashtags #hastag #tags #delloite
Рекомендации по теме
Комментарии
Автор

Hi Sagar, Thanks for the content..My approach
for a, b in enumerate (input):
output_list=[]
for c, d in enumerate(input):
if b<d and c>a:
output_list.append(d)
print(b, len(output_list), output_list)

mohdtoufique
Автор

for i in range(len(a)):
res=[]
count=0
for j in range(i+1, len(a)):
if a[j]>a[i]:
count+=1
res.append(a[j])
print(a[i], count, res)

vikrantyadav
Автор

Hello Sagar,
My Approach of doing this :


inputList:list = [99, 28, 12, 55, 13, 15, 76, 99]
for idx1, num1 in enumerate(inputList):
filteredList:list = [num2 for idx2, num2 in enumerate(inputList) if num2 > num1 and idx2 > idx1]
print(num1, len(filteredList), filteredList)

Output :


99 0 []
28 3 [55, 76, 99]
12 5 [55, 13, 15, 76, 99]
55 2 [76, 99]
13 3 [15, 76, 99]
15 2 [76, 99]
76 1 [99]
99 0 []

starmscloud
Автор

Bhai umyea b batana tha ki count ko fir loop k under kyu liya print ko fir loop k under kyu liya toda explainaion or acha ho skta tha

kenpachi-zaraki
Автор

Take this optimised code guys:

input = [99, 28, 12, 55, 13, 15, 76, 99]
inputSet= set(input)
inputList=list(inputSet)
inputList.sort()

for item in inputList:
length=len(inputList)

print(item, length-(item_index+1), inputList[inputList.index(item)+1:])

DataCoholic
Автор

For index, value in enumerate(a):
X=[ j for i, j in enumerate(a) if j>value and i>index]
Print(value, len(x), x)

rallabandivijayvijay
Автор

a=[99, 28, 12, 55, 13, 15, 76, 99]
d={}
temp=sorted(set(a))
print(temp)
for i in a:
for j in range(0, len(temp)):
if i==temp[j]:
d[i]=j
else:
pass
print(d)

tapaspal
Автор

my approach
d=[99, 28, 12, 55, 13, 15, 76, 99]
for i in range(len(d)):
a=d[i]
b=[]
for j in range(i+1, len(d)):
if d[j]>a:
b.append(d[j])
print(f"{a} {len(b)} {b}")

javeedmohammedabdul