Software engineer front end sollicitatievragen

9K

Sollicitatievragen voor Software Engineer Front End gedeeld door sollicitanten

Meest gestelde sollicitatievragen

Sorteren: Relevantie|Populair|Datum
Accenture
Er werd een Senior Front End Developer gevraagd...14 juli 2017

What are your greatest technical strengths?

8 antwoorden

Management

Social media experience

I am technically sound in using R script for R programming language, base SAS, SAS analytics and Advanced SAS. Minder

Meer reacties weergeven
LinkedIn

// Given var endorsements = [ { skill: 'css', user: 'Bill' }, { skill: 'javascript', user: 'Chad' }, { skill: 'javascript', user: 'Bill' }, { skill: 'css', user: 'Sue' }, { skill: 'javascript', user: 'Sue' }, { skill: 'html', user: 'Sue' } ]; getSkills = (endorsements) => { // Result // [ // { skill: 'javascript', user: ['Chad', 'Bill', 'Sue'], count: 3 }, // { skill: 'css', user: ['Sue', 'Bill'], count: 2 }, // { skill: 'html', user: ['Sue'], count: 1 } // ]; } see this image: http://i.imgur.com/UIeB3n4.png

7 antwoorden

let endorsements = [ { skill: 'css', user: 'Bill' }, { skill: 'javascript', user: 'Chad' }, { skill: 'javascript', user: 'Bill' }, { skill: 'css', user: 'Sue' }, { skill: 'javascript', user: 'Sue' }, { skill: 'html', user: 'Sue' }, ]; let x = endorsements.reduce((acc, { skill, user }) => { if (skill in acc) { acc[skill] = { user: [...acc[skill]['user'], user], count: acc[skill]['count'] + 1, skill: skill, }; } else { acc[skill] = { user: [user], count: 1, skill: skill, }; } return acc; }, {}); console.log(Object.values(x)); Minder

I did in a different way let outPut = []; let skillMap = {}; for (let char of endorsements) { if (char['skill'] in skillMap) { skillMap[char['skill']] = [...skillMap[char['skill']], char['user']]; } else { skillMap[char['skill']] = [char['user']]; } } for (let key in skillMap) { let skillObj = {}; skillObj['skill'] = key; skillObj['user'] = skillMap[key]; skillObj['count'] = skillMap[key].length; outPut.push(skillObj); } return outPut.sort((a, b) => b.count - a.count); Minder

getSkills = endorsements => { const skillMap = {}; // assumption - each object has all the properties, nothing is missing endorsements.forEach((item, index) => { const { skill, user } = item; if (!skillMap[skill]) { skillMap[skill] = {}; skillMap[skill]["user"] = []; // skillMap[skill]["user"].push(user); skillMap[skill]["count"] = 0; } skillMap[skill]["user"].push(user); skillMap[skill]["count"] += 1; // } }); return Object.keys(skillMap).map(key => [ { skill: key, ...skillMap[key] } ]); }; Minder

Meer reacties weergeven
Booking.com

In your opinion, what is our company's single most important metric?

7 antwoorden

Reservations per day I guess

It's always revenue my man/woman

"It's always revenue my man/woman." I hope you understand how irrelevant you observation is in the context of this position. So no, it's not "always revenue." Minder

Meer reacties weergeven
PE International

"If you were stranded on a desert island, what three development tools would you bring with you?"

5 antwoorden

This ridiculous, senseless question was the first one asked. It set the tone for what was to follow. Minder

IDE, Build Tools, Version Control!

Git, Codio, and Netflix

Meer reacties weergeven
Bloomberg L.P.

What is a JavaScript callback function?

5 antwoorden

A callback function is a piece of JavaScript code that executes after the main function that the callback is attached to executes successfully. Minder

udaykanth, I would say that a .forEach() would be the most common and most basic use of a callback function. I'm just writing this to help anyone that might have a hard time thinking up a quick example if the come across this question themselves. Example: var numArray = [ 1, 2, 3 ] ; numArray.forEach( function( i ) { console.log( arr[ i - 1 ] ) } ) ; // logs out // 1 // 2 // 3 Minder

I don't think Bloomberg is a very good company. I am an excellent web developer and have gotten multiple offers from other companies with big names, but was rejected by Bloomberg. They are too demanding during the job interview and it becomes a game of how well you can interview as opposed to how talented an employee you are and how much you can contribute to the growth of the company. Minder

Meer reacties weergeven
IBM

1. To add an HTTP request to the search engine, then log a result depending on the# of pages and requirements. 2. Use DP to implement a Knapsack-like problem. Restrictions on time complexity. 3. Implement a to-do list's delete method on website.

5 antwoorden

To X: Get rejected

Did they request to do a background screening on you before rejecting?

No

Meer reacties weergeven
Meta

Given an array where each entry can be another array, and so forth, flatten the array. [4, [3, 6, [9, 1, 9, [5, 1]]], 8] -> [4, 3, 6, 9, 1, 9, 5, 1, 8]

5 antwoorden

Assuming that we are solving this in Java, I am treating an array as an array list // Use Hash Set to prevent infinite loops HashSet hs = new HashSet(); ArrayList flatten_list(ArrayList arr, HashSet hs) { ArrayList result = new ArrayList; int len = arr.size(); if(len < 1) return result; // Empty List. for(int i = 0 ; i Minder

function serialize(a, start){ if(start >= a.length) return a; if(Array.isArray(a[start])) return serialize([...a.slice(0,start),...a[start], ...a.slice(start+1,a.length)], start+1); return serialize(a, start+1); } Minder

const flatten = array = > { return array.reduce((elem, acc) = > { return elem.concat(Array.isArray(acc) ? flatten(acc) : acc) }, []) } Minder

Meer reacties weergeven
Veeva Systems

public class Person { Person father; Person mother; Gender gender; Integer age; List<Person> children; int level = 0; public enum Gender { Male, Female; } } For the above class, you basically have to implement 2 methods. public List<Person> getOldestSisters() public List<Person> getGreatestAncestors()

5 antwoorden

/** * Returns the Persons which are the greatest number of levels up the family tree * from this instance. Examples: * Given a tree where this person instance only has a mother and father, return mother and father. * Given a tree where this person instance has a mother &amp; father, and a grandfather on the mother's side, return only the grandfather on the mother's side. * @return List of Person */ public List getGreatestAncestors() { // If this is the root of the tree, return empty array because there is no ancestor for the tree if (this.father == null &amp;&amp; this.mother == null) { return new ArrayList(); } List fList = new ArrayList(); List mList = new ArrayList(); if (this.father != null) { fList = this.father.getGreatestAncestors(); } if (this.mother != null) { mList = this.mother.getGreatestAncestors(); } List results = new ArrayList(); for (Person p : fList) { if (results.contains(p)){ continue; } results.add(p); } for (Person p : mList) { if (results.contains(p)){ continue; } results.add(p); } return results; } Minder

I cranked this out in about 30 minutes. I believe it works quite well. I've also included the corresponding unit tests: file: Person.java ------------------------------------------------------------------------------------------------------------- package Command; import java.util.ArrayList; import java.util.HashSet; import java.util.List; public class Person { Person father; Person mother; Gender gender; Integer age; List children; int level = 0; public enum Gender { Male, Female; } Person(Person dad, Person mom, Gender gender, int age, int level) { this.father = dad; this.mother = mom; this.gender = gender; this.age = age; this.level = level; } public void setChildren(List children) { this.children = children; } public void addChild(Person child) { this.children.add(child); } public List getOldestSisters () { // given the current person (self), determine parents // then get children of those parents // Determine gender of each child // Where they are female, get ages // return females with age &gt; mine // Note: must check on both sides father/mother as there may be a mixed marriage // Combine list of children - Exclude YOU as you cannot be your own sister. // Use a set to eliminate duplicates. HashSet allChildren = new HashSet(); // Can't add null to a hashSet so screen for it. if ((father != null) &amp;&amp; (father.children != null)){ allChildren.addAll(father.children); } if ((mother != null) &amp;&amp; (mother.children != null)) { allChildren.addAll(mother.children); } // If you are not in this list, there is an issue! if (allChildren.contains(this)) { allChildren.remove(this); // System.out.println("Removing self from list."); } else { System.out.println("Error: You are not a child of your parents! Adopted?"); } // Filter down to only women and get any older than me: int myAge = this.age; List oldestSisters = new ArrayList(); for (Person child : allChildren) { if (child.gender == Gender.Female) { if (child.age &gt; myAge) { oldestSisters.add(child); } } } return oldestSisters; } public List getGreatestAncestors() { if ((this.father == null) || (this.mother == null)) { return null; // You must have two parents to have ancestors } // Find root parents List myParents = getParents(this); return getElders(myParents); } private List getElders(List parents) { List elders = new ArrayList(); List myParents = new ArrayList(); boolean newElders = false; for (Person parent : parents) { myParents = getParents(parent); if (myParents.isEmpty()) { elders.add(parent); } else { elders.addAll(myParents); newElders = true; } } if (newElders == true) { return getElders(elders); } return elders; } private List getParents(Person person) { List parents = new ArrayList(); if (person.father != null) parents.add(person.father); if (person.mother != null) parents.add(person.mother); return parents; } } // For the above class, you basically have to implement 2 methods. // public List getOldestSisters() // public List getGreatestAncestors() Minder

package Command; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; import static org.junit.jupiter.api.Assertions.*; class PersonTest { // Create grand parents Person grandFatherDad = new Person(null, null, Person.Gender.Male, 78, 1); Person grandMotherDad = new Person(null, null, Person.Gender.Female, 81, 1); Person grandFatherMom = new Person(null, null, Person.Gender.Male, 69,1); Person grandMotherMom = new Person(null, null, Person.Gender.Female, 89, 1); // Create parents / aunts and uncles Person father = new Person(grandFatherDad, grandMotherDad, Person.Gender.Male, 48, 2); Person mother = new Person(grandFatherMom, grandMotherMom, Person.Gender.Female, 47, 2); Person aunt1 = new Person(grandFatherMom, grandMotherMom, Person.Gender.Female, 47, 2); // Twin sis to mom Person aunt2 = new Person(grandFatherDad, grandMotherDad, Person.Gender.Female, 37, 2); Person uncle1= new Person(grandFatherDad, grandMotherDad, Person.Gender.Male, 35, 2); // Children (me and bros and sis) Person self = new Person(father, mother, Person.Gender.Male, 18, 3); Person brother1 = new Person(father, mother, Person.Gender.Male, 16, 3); Person sister1 = new Person(father, mother, Person.Gender.Female, 15, 3); Person sister2 = new Person(father, mother, Person.Gender.Female, 14, 3); @BeforeEach void setUp() { // Create children / sibling groups List children = new ArrayList(); children.add(father); children.add(aunt1); children.add(uncle1); grandFatherDad.setChildren(children); grandMotherDad.setChildren(children); children.clear(); children.add(mother); children.add(aunt2); grandFatherMom.setChildren(children); grandMotherMom.setChildren(children); children.clear(); children.add(self); children.add(brother1); // Dad had brother with other wife children.add(sister2); father.setChildren(children); // mom came with her own daughter from prior marriage children.clear(); children.add(self); children.add(sister1); children.add(sister2); mother.setChildren(children); } @AfterEach void tearDown() { } @Test void getOldestSisters() { // When there are no older sisters and I am male: //Person me = new Person(father, mother, Person.Gender.Male, 48); List olderSisters = null; olderSisters = self.getOldestSisters(); assertTrue(olderSisters.isEmpty(), "No older sisters."); // When there is one older sister and I am male Person sister3 = new Person(father, mother, Person.Gender.Female, 50, 3); mother.addChild(sister3); father.addChild(sister3); olderSisters = self.getOldestSisters(); assertTrue(olderSisters.contains(sister3)); assertTrue(olderSisters.size() == 1, "One older full sister."); // Youngest Sister has two older sisters (one full, one half) olderSisters.clear(); olderSisters = sister2.getOldestSisters(); assertTrue(olderSisters.contains(sister1)); assertTrue(olderSisters.contains(sister3)); assertTrue(olderSisters.size() == 2, "One older full, one older half"); } @Test void getGreatestAncestors() { List ancestors = self.getGreatestAncestors(); assertTrue(ancestors.size() == 4); assert(ancestors.contains(grandFatherDad)); assert(ancestors.contains(grandFatherMom)); assert(ancestors.contains(grandMotherDad)); assert(ancestors.contains(grandMotherMom)); ancestors = father.getGreatestAncestors(); assertTrue(ancestors.size() == 2); assert(ancestors.contains(grandFatherDad)); assert(ancestors.contains(grandMotherDad)); ancestors = mother.getGreatestAncestors(); assertTrue(ancestors.size() == 2); assert(ancestors.contains(grandFatherMom)); assert(ancestors.contains(grandMotherMom)); ancestors = grandFatherDad.getGreatestAncestors(); assertNull(ancestors, "getGreatestAncestors():Persons with no ancestors should return null."); } } Minder

Meer reacties weergeven
LinkedIn

// How can I know which radio was clicked or selected? <h2>Monstrous Government Form</h2> <form id="myForm" name="myForm"> <fieldset> <legend>Do you live in an:</legend> <p><input type="radio" name="home" value="apartment" id="apartment" /> <label for="apartment">Apartment</label></p> <p><input type="radio" name="home" value="house" id="house" /> <label for="house">House</label></p> <p><input type="radio" name="home" value="mobile" id="mobile" /> <label for="mobile">Mobile Home/Trailer</label></p> <p><input type="radio" name="home" value="coop" id="coop" /> <label for="coop">Co-op</label></p> <p><input type="radio" name="home" value="none" id="none" /> <label for="none">None</label></p> </fieldset> <fieldset> <legend>Your income is:</legend> <p><input type="radio" name="inc" value="0-50K" id="0-50K" /> <label for="0-50K">$0-50,000 USD</label></p> <p><input type="radio" name="inc" value="50-100K" id="50-100K" /> <label for="50-100K">$50,000-100,000 USD</label></p> <p><input type="radio" name="inc" value="100K+" id="100K+" /> <label for="100K+">$100,000+ USD</label></p> </fieldset> <fieldset> <legend>Your status is:</legend> <p><input type="radio" name="status" value="single" id="single" /> <label for="single">single</label></p> <p><input type="radio" name="status" value="married" id="married" /> <label for="married">married</label></p> <p><input type="radio" name="status" value="partner" id="partner" /> <label for="partner">domestic partner</label></p> </fieldset> <p>This form goes on with another 97 questions....</p> <input type="submit" value="Submit" /> </form>

5 antwoorden

Attach the event listener to the form id="myForm"...

document.querySelector('input[name="house"]:checked').value;

you can add oncl1ck event to assign event target value to a variable for each fieldset, since there are 3 different field sets, and we want to know each of them separately. Minder

Meer reacties weergeven
Yahoo

Design a data structure to store sparse 2D matrix which contains only 0 or 1. then write function to add 2 such matrix.

4 antwoorden

use run-length encoding.

store each row as a decimal for ex: if the row is 1011 -&gt; store it as 13!

Since all values are mod 2 you can pack 64 entries together into on int64_t. You can then add two matrices by XORing each entry. Minder

Meer reacties weergeven
Weergave: 1 - 10 van 9.201 sollicitatievragen