Production engineer sollicitatievragen

1K

Sollicitatievragen voor een Production Engineer gedeeld door sollicitanten

Meest gestelde sollicitatievragen

Sorteren: Relevantie|Populair|Datum
Meta
Er werd een Production Engineer gevraagd...27 mei 2015

Take a paragraph as Input and output the top three most repeated words

5 antwoorden

from collections import Counter def get_most_3_repeated_words(paragraph): counter = Counter(paragraph.split()) return sorted(counter.items(), key=lambda x: x[1])[-3:] Minder

#/usr/bin/env python from collections import defaultdict wordlst = [] wordcnt = defaultdict(lambda : 0) paragraph = open('/home/nacho/python_test.txt','r') for line in paragraph.readlines(): for word in line.split( ): wordcnt[word] += 1 del wordlst paragraph.close() mostCommon3 = wordcnt.items() del wordcnt mostCommon3 = sorted(mostCommon3, key=lambda value: value[1], reverse=True) for indx in xrange(3): print "%s: %i" % (mostCommon3[indx][0], mostCommon3[indx][1]) Minder

A more correct shell answer, which returns the top word first: for word in `cat input.txt`; do echo $word; done | sort | uniq -c | sort -nr | head -3 | awk '{print $2}' Minder

Weergeven Meer reacties
Meta

What does "$?" mean in bash?

5 antwoorden

returns the status code of the last executed command

The exit code of the last executed command.

The exit code of the last executed command.

Weergeven Meer reacties
Meta

What options do you have, nefarious or otherwise, to stop people on a wireless network you are also on (but have no admin rights to) from hogging bandwidth by streaming videos?

5 antwoorden

This question is basically a way of ascertaining how much knowledge you have of the effect of distorting networking protocols in nonstandard ways. Everything from "ask them politely to stop" to "hijack their connection". Minder

set a dns server with the same MAC of real DNS server, forward all the "healthy" traffic back to real DNS, hijack the Domain related to video streaming. Minder

Anonymous on Apr 4, 2016: (but have no admin rights to)?

Weergeven Meer reacties
Meta

For a given set of software checkins, write a program that will determine which part along the branch where the fault lies.

4 antwoorden

A - array of versions, |A| = n check(A[0]) = true - first version is fine check(A[n-1]) = false - last version has the fault binary search: int start = 0; int end = n-1; while(end-start>1){ int middle = (end+start)/2; if (check(A[middle])) start = middle; else end = middle; } A[end] is the version with the fault Minder

first, design a test case to detect the failure. next, determine the last known "good" state of the software, i.e. the revision number of the last known "good" state. now, write a script that will check out each subsequent revision starting from the known good revision, build, run the test case and examine the output. When output fails, you can determine the revision at which the bug was introduced. Minder

I would write an integration test, for that scenario which started to fail. Then I'd write a shell script which would run that test over some amount of last revisions. Once test is failed, you've found a revision where mistake was made. Minder

Weergeven Meer reacties
Meta

Why wouldn't you want a root DNS server to answer queries for you, instead of delegating you to an authoritative server?

4 antwoorden

Because root DNS server can't handle zillions of requests at once, that's why you need a load balancer to split tasks on multiple DNS servers. every server has it's own limits, and load balancing helps to "scale" the limits. Minder

because it would be faster due also to caching mechanism.

DNS servers basically are text file doing Name to IP mapping(A type). So if a root server had to answer all the queries ,it would essentially be a million line text file, mapping each and every website.This would result in large CPU processing and time. Essentially, Root servers redirect the query to top level DNS servers and so on Minder

Weergeven Meer reacties
Meta

Name three states a process can be in.

4 antwoorden

Running, Stopped, IOwait

D = uninterruptible sleep (waiting for io) R= running S = interruptible sleep T= stopped by job control signal t= stopped by debugger with tracing x = dead z= zombie (dead) waiting for its return value to be recovered by parent process Source: ps man page Minder

NEW- The process is being created. READY- The process is waiting to be assigned to a processor. RUNNING- Instructions are being executed. WAITING- The process is waiting for some event to occur(such as an I/O completion or reception of a signal). TERMINATED- The process has finished execution. Minder

Weergeven Meer reacties
AOL

You have two water buckets: the first can hold 3 gallons of water and the second can hold 5 gallons of water, how do you fill the 5 gallon bucket with exactly 4 gallons of water using these two buckets (the 3 gallon and 5 gallon bucket)?

4 antwoorden

Easiest way: * Fill the 5 gallon bucket with water. * Pour out 3 gallons into the 3 gallon bucket, now there are 2 gallons of water in the 5 gallon bucket. * Empty the 3 gallon bucket. * Pour the remaining 2 gallons of water in the 5 gallon bucket into the 3 gallon bucket. * Refill the 5 gallon bucket with water again. * Fill the 3 gallon bucket with the 5 gallon bucket until full, 1 gallon will be removed from the 5 gallon bucket and thus you have 4 gallons of water in the 5 gallon bucket. Minder

There is another way of doing it. Take a full 3 gallon bucket and pour into the empty 5 gallon bucket. Take another full 3 gallon and pour it into the 5 gallon bucket until it gets full. Now there will be one gallon in the 3 gallon bucket. Now empty the 5 gallon bucket and pour the remaining one gallon from the 3 gallon bucket into the empty 5 gallon bucket. Now pour full 3 gallon bucket into the 5 gallon bucket.You will get 4 gallons in the 5 gallon bucket. Minder

Fill both buckets half way

Weergeven Meer reacties
OPPO

about work experience

3 antwoorden

about machines

1 year experience and I worked as production engineer

Production engineer

Cerner

Difference b/w C++ and Java

3 antwoorden

How long did it take to know that you were not selected after the interview ?

1 week

How did u get to know ? Through their career site ?

Meta

Question 1: You will be supplied with two data files in CSV format . The first file contains statistics about various dinosaurs. The second file contains additional data. Given the following formula, speed = ((STRIDE_LENGTH / LEG_LENGTH) - 1) * SQRT(LEG_LENGTH * g) Where g = 9.8 m/s^2 (gravitational constant) Write a program to read in the data files from disk, it must then print the names of only the bipedal dinosaurs from fastest to slowest. Do not print any other information. $ cat dataset1.csv NAME,LEG_LENGTH,DIET Hadrosaurus,1.4,herbivore Struthiomimus,0.72,omnivore Velociraptor,1.8,carnivore Triceratops,0.47,herbivore Euoplocephalus,2.6,herbivore Stegosaurus,1.50,herbivore Tyrannosaurus Rex,6.5,carnivore $ cat dataset2.csv NAME,STRIDE_LENGTH,STANCE Euoplocephalus,1.97,quadrupedal Stegosaurus,1.70,quadrupedal Tyrannosaurus Rex,4.76,bipedal Hadrosaurus,1.3,bipedal Deinonychus,1.11,bipedal Struthiomimus,1.24,bipedal Velociraptorr,2.62,bipedal 2. Split an array such a way that their sum is the same. Systems questions: Explain vmstat command System calls Asked to write a program using bash

3 antwoorden

#include #include #include #include #include #include #define r 4 #define r2 r*r #define g 9.8/r2 double CalculateSpeed (double dStrideLen, double dLegLen) { return ((dStrideLen/dLegLen - 1) * sqrt(dLegLen * g)); } int main() { std::string strLine; //1 Line from file std::string strWord; //Word from parsed line std::string strName; //Name from parsed line double dLegLength = 0.0, dStrideLen = 0.0; int i=0; std::unordered_map mapDataSet2; std::map mapOutput; std::priority_queue> maxHeap; std::ifstream ifDataset2 ("dataset2.csv"); //1. Open dataset2.csv std::getline (ifDataset2, strLine); //Ignore 1st line of dataset2.csv //Read dataset2.csv and store in map while (ifDataset2.eof() == 0) { //Read file dataset2.csv std::getline (ifDataset2, strLine); std::stringstream oSSDataSet2(strLine); while (std::getline(oSSDataSet2, strWord, ',')) { if (i==0){ strName = strWord; } if (i==1){ std::istringstream(strWord) >> dStrideLen; mapDataSet2[strName] = dStrideLen; } ++i; } i=0; } std::cout> dLegLength; auto it = mapDataSet2.find(strName); if(it != mapDataSet2.end()){ dSpeed = CalculateSpeed(it->second, dLegLength); // std::cout p = maxHeap.top(); std::cout< Minder

There's a lot of elements to typically cover in these questions, clarifications, scoping, making sure you're answering the actual question the interviewer is looking for you to answer, etc. Could be worth doing a mock interview with one of the Prepfully Facebook Production Engineer experts... they've worked in the role so they clearly know how to get through the interview. prepfully.com/practice-interviews Minder

import csv import math class Dinosaur: def __init__(self, name, diet=None, stance=None, strideLength=None, legLength=None): self.name = name self.diet = diet self.stance = stance self.strideLength = strideLength self.legLength = legLength class Park: def __init__(self, name): self.name = name self.dinosaurs = [] def add_dinosaur(self, dinosaur): self.dinosaurs.append(dinosaur) def update_dino_by_name( self, name, diet=None, stance=None, strideLength=None, legLength=None ): for dinosaur in self.dinosaurs: if dinosaur.name == name: if dinosaur.diet == None: dinosaur.diet = diet if dinosaur.stance == None: dinosaur.stance = stance if dinosaur.strideLength == None: dinosaur.strideLength = strideLength if dinosaur.legLength == None: dinosaur.legLength = legLength def get_speed_list(self): speedList = {} for dinosaur in self.dinosaurs: if dinosaur.stance == "bipedal": speed = float(0) name = dinosaur.name legLength = dinosaur.legLength strideLength = dinosaur.strideLength speed = ((strideLength / legLength) - 1) * (math.sqrt(legLength * 9.8)) speedList[name] = speed return speedList jurasicPark = Park("JurasicPark") with open("dataset1.csv", "r") as file: reader = csv.reader(file) for i, row in enumerate(reader): if row[0] != "NAME": jurasicPark.add_dinosaur( Dinosaur(row[0], row[2], None, None, float(row[1])) ) with open("dataset2.csv", "r") as file: reader = csv.reader(file) for i, row in enumerate(reader): if row[0] != "NAME": jurasicPark.update_dino_by_name(row[0], None, row[2], float(row[1]), None) sorted_dict = {} _dict = jurasicPark.get_speed_list() sorted_keys = sorted(_dict, key=_dict.get) _list = list(sorted_keys) _list.reverse() print(_list) Minder

Weergave: 1 - 10 van 1.231 Sollicitatievragen