Skip to main content
0:00est. 9 min

Intuit

/** 
ROUND1: Task1
var x = 23;
(function(){
var x = 43;
(function random(){
x++; //undefined
console.log(x); // undefined
var x = 21;
})();
})();
*/
/*
/*
ROUND1: TASK 2
Given an unsorted integer array, find a pair with the given sum in it.

let target = 6
let arr = [5,4,1,2,3]
*/

function getPairX(arr, target) {
let pair = [];
// [5,4,1,2,3]
// first 5
// 4,1 -> pair[5,1];
for(let i=0; i<arr.length; i++) {
let first = arr[i];
for (let j=i+1;j<arr.length; j++) {
let second = arr[j];
if (target === second+first) {
pair = [first, second];
break;
}
}
if (pair.length) {
break;
}
}
return pair;
}

function getPair(arr, target) {
let pair = [];
let map = {};
// {
// 5:0, // second = 6-5
// 4:1, // second = 6-4
// 1:2, // second = 6-1
// }

// O(N)
for(let i=0; i<arr.length; i++) {
if (!map[arr[i]]) {
map[arr[i]] = i;
}
let second = target-arr[i];
if (map[second]) {
pair = [arr[map[second]], arr[i]];
}
if (pair.length) {
break;
}
}
return pair;
}

console.log(getPair([5,4,1,2,3], 6));

// live coding Promise polyfill Balanced brackets
// Implement a uni-directional graph and print it out. Coding tool for the assessment was Glider.
// Function currying, closures, scopes, React hooks, Small code snippets Round 3 - Trade off for choosing a particular library, scaling concerns
// 3 - Craft demo Round - Asked me to develop a full stack web application deployed on docker. This app should cater the Analyst to monitor the transactions happening on the online retail store (10 days for implementation)
// The craft demo was really simple. For the level 2 position I was just asked to get data from an api and display it. I received the craft demo on the spot and was asked if I preferred front or back end. The person who gives you the prompt has no say in you getting the job, and was very helpful and friendly. All in all, I received a really basic prompt for a solely front-end app. The best advice I can give is to brush up on unit testing, that is something they look for in level 2 engineers. Didn't tell me until after the final round :(

/**
*

Product Requirements
You are building a responsive web application that helps self helps self-employed individuals to track their income and expenses in order to give them better insights of their monetary situation, so they can focus on what they love doing without worrying about their finances!
In order to do so, you need to create a dashboard which contains a set of widgets:
A widget (Summary Widget) to track a summary of the customer’s financial status.
It should read the data from the list of transactions from the customer’s bank account.
Where each transaction contains the transaction date; a description; a unique reference number; and a monetary amount which could be positive (cash in) or negative (cash out)
This widget should show the total monetary amount in the bank account looking at the transaction data.
If the total is greater than a configured positive threshold, the number should be shown in green
If the total is lower than the same configured threshold from before (but the total is still positive) the number should be shown in yellow
If the total is lower than 0.00, the number should be shown in red
One widget (Invoices Widget) to manage the list of invoices the user has for his/her customers, which supports both editing existing invoices as well as creating new ones.
Each invoice contains the following:
name of the client
the creation date
a unique reference number
a monetary amount, which could be positive (money to be received) or negative (a refund to the customer)
a status (PAID or NOT PAID).
Every field should be modifiable, except the invoice status which is read only and it is worked out in the following way:
An invoice is considered PAID if there is a bank transaction for the same amount, with the bank transaction’s reference number being equal to the invoice’s reference number, and with the bank transaction date being later than the invoice creation date.
An invoice is considered NOT PAID if the previous criteria is not matched.
Users should be able to create a new invoice.
Other Requirements:
Summary widget should also show the number of invoices created in the last 30 days.
Changes in one widget should automatically update other widgets. - I.e. the creation of an invoice should affect the summary widget, as this shows the number of invoices created in the month.






Build an image carousel
Build an image carousel component! It should have:
An image actively being displayed
Two buttons, one to move forward and one to move back
Display these images:
const urls = [
"https://images.pexels.com/photos/269255/pexels-photo-269255.jpeg",
"https://images.pexels.com/photos/355235/pexels-photo-355235.jpeg",
"https://images.pexels.com/photos/416179/pexels-photo-416179.jpeg"
]
Links to Extra Files or References
Here is an (exceptional) example from Bootstrap just so the candidate gets an idea of what they're making.
https://mdbootstrap.com/docs/standard/components/carousel/


https://codepen.io/kieter/pen/poNNdjq

*/