# 9K

Sollicitatievragen voor een front end engineer gedeeld door sollicitanten

## Meest gestelde sollicitatievragen

Sorteren: Relevantie|Populair|Datum
Er werd een Front End Engineer gevraagd...16 oktober 2018

### You are given an array of N elements in the form "property1: value1; property2: value2;...;propertyX: valueX;" for some some N and any X. There is also another array of M elements of the form "property: value". You are supposed to write an algorithm to remove every element in the N length array that has a "property: value" pair in the M length array. The trick is that the most intuitive solution of iterating through the M array and filtering the N array at each element is already written. You must come up with a solution that solves the problem in less than O(NM) time.

3 antwoorden

You can use HashMap to solve it with a time complexity of Max of O(N), O(M)

If I understand the question correctly, array N contain objects that only have one property value pair. 1. Sort array N by property name O(nlogn); 2. Iterate M and perform binary search on array N to remove. O(mlogn) You get O(2mlogn) by the end, which is still faster than O(mn) Minder

My interpretation of the problem - 1st array = [ { car: "honda", "name": "John"}, { car: "bmw", "name": "Johnny", "os": "ios"}, { car: "toyota", "name": "JohnX", "os": "android"}, ] 2nd array = [{ "car":"honda" }, { "os": "android" }]; As per the 1st post - create a map of the 2nd array - so it'll be O(1) lookup time, although a new space of O(M). I can't think of any other way besides filtering through the entire 1st array. So, if that 2nd array has N objects with max of X key, value pairs - just iterating through them will be O(NX). Qn for 2nd poster - how do you sort the 1st array? Minder

### 2 quzzle solving question in coding round

3 antwoorden

what type of codine question's?

What are the skype interview questions

What were the skype interview questions

### Basic JavaScript concepts and algorithm type problems (not data structures, more given a problem solve it with an algorithm)

3 antwoorden

Can you please tell me , How long did they take to tell the results ?

A few hours

Thank you ..

3 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

### What situation arises when you have a parent div and all it contains is a pair of floating divs? And how can you remedy the situation.

3 antwoorden

overflow:hidden;

Yes, overflow:hidden is the best way to do it. Another way is to use a technique called clearfix using psuedo-element :after Minder

When a div contains only floating elements it thinks nothing is inside so it will have a height of 0 if none is specified. This is known as a floating div clearing problem since the floating divs are not being cleared inside the parent div. There are a couple solutions, you can add an extra empty div after the floating divs with style clear:both to clear the floating divs. Only problem is this adds extra markup. Alternatively, there are some known CSS hacks such as setting the width:100% and the overflow:auto on the parent div. Minder

### Which of the interviewers did you least like?

2 antwoorden

I haven't known any of them long enough...

Unfortunately, I got asked the exact same question when I was interviewing your company for a front-end role last year. I clearly remember the question. I was really shocked back then and told my friends about the question that I got. It was from my last interviewer. Minder

### Write the output of the following code: cout<<2++<<endl; count<<3++<<endl;

3 antwoorden

2 3 (Answer) 2++ will print first and increment later. If it were ++2 it would increment first print later Minder

Why is C program question asked for a frontend interview ? Shouldnt the question be regarding html, css or JS ? Minder

What was the technical session problem? give a little description please

### // 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

4 antwoorden

getSkills = endorsements =&gt; { const skillMap = {}; // assumption - each object has all the properties, nothing is missing endorsements.forEach((item, index) =&gt; { 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 =&gt; [ { skill: key, ...skillMap[key] } ]); }; Minder

let array=[]; let user_Array=[]; let value_exist=false; for(let i=0,len=endorsements.length;i Minder

const getSkills = (endorsements) =&gt; { const endorsementsMap = endorsements.reduce((accum, curr) =&gt; { const { skill, user } = curr; if (accum.has(skill)) { accum.set(skill, [...accum.get(skill), user]); } else { accum.set(skill, [user]); } return accum; }, new Map()); let result = []; for (let [skill, user] of endorsementsMap.entries()) { result.push({ skill, user, count: user.length || 0 }); } return result; }; Minder

Weergeven Meer reacties

### array related questions

3 antwoorden

Hi, Can you please tell me what all questions on asked in the technical round interview? Minder

Array manipulations and string manipulations are some of them

Ok, so are you working there right now?

### Code some code that checks if any items in an array are greater than 10

3 antwoorden

const arr = [-1,0,'hi',undefined,null,8,9,10,100,4325,231] arr.filter(item =&gt; item &gt; 10) Minder

True, that was basically my answer The interviewer also mentioned the .some method afterwards. Minder

array.some(x =&gt; x &gt; 10)

Weergave: 41 - 50 van 8.654 Sollicitatievragen

## Sollicitatievragen weergeven voor vergelijkbare functies

net developerui developerweb developersoftware engineerfront end developerui engineer