Preguntas de entrevista para el puesto de R generalist en España
3
Preguntas de entrevista para R Generalist compartidas por los candidatosPrincipales preguntas de entrevista

What would you do if an employee came to you and said that they wanted to go home because they were feeling ill?
1 respuestas↳
I said, Let the supervisor know and send them home. NO! Wrong answer, send them to the medical office first for medical review. Menos

Can you spot the fradulant document in this pile? I can! let me show you why.....
1 respuestas↳
Oh, I thought that one looked valid. "No."

Your program should perform parentheses matching on a given string to verify that the parentheses are balanced. It should print "True" if the match is good and "False" if the match is bad. The input will be a string with 3 different kinds of parentheses - { }, [ ], ( ) Examples: Valid: (returns True) abc{def}ghi(jkl)mno[pqr] a{([b])} Invalid: (returns False) abc{(def}) ab[c) abc}def{ Bonus Points for solutions that do not use extra memory (ex. mutable variables) to store state.
1 respuestas↳
def func(x): a=0 b=0 c=0 for i in x: if(i=='('): a+=1 if(i=='{'): b+=1 if(i=='['): c+=1 if(i==')'): if(a>0): a-=1 else: return False if(i=='}'): if(b>0): b-=1 else: return False if(i==']'): if(c>0): c-=1 else: return False if(a==0 and b==0 and c==0): return True else: return False x=input() print(func(x)) Menos