Posted on July 6, 2020 Leave a Comment
Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed). For example, given the string “([])[]({})”, you should return true. Given the string “([)]” or “((()”, you should return false. There is are Stack implementation currently available in Apex so we can use a List to […]
Posted on July 6, 2020 Leave a Comment
Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Numbers can be 0 or negative. For example, [2, 4, 6, 2, 5] should return 13, since we pick 2, 6, and 5. [5, 1, 1, 5] should return 10, since we pick 5 and 5. Follow-up: Can you […]
Posted on June 29, 2020 2 Comments
Implement an autocomplete system. That is, given a query string s and a set of all possible query strings, return all strings in the set that have s as a prefix. For example, given the query string de and the set of strings [dog, deer, deal], return [deer, deal]. Hint: Try preprocessing the dictionary into […]
Posted on June 25, 2020 1 Comment
Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well. For example, the input [3, 4, -1, 1] should give 2. The input [1, 2, 0] should give 3. […]
Posted on June 24, 2020 Leave a Comment
Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]. If our input […]
Posted on May 13, 2020 Leave a Comment
Below details the different Salesforce events types for different use cases 1. Change Data Capture Select the entities that generate change event notifications. Change Data Capture sends notifications for created, updated, deleted, and undeleted records. All custom objects and a subset of standard objects are supported. /data/AccountChangeEvent – any changes to accounts Create account Update […]
Posted on May 12, 2020 Leave a Comment
What’s a Service/API A service/API is a function that is well-defined, self-contained, and does not depend on the context or state of other services. 1. Abstract vs Concrete When developing software we often use abstraction and polymorphism to get most of our applications. We want to reuse as much of the code as possible. Should […]
Posted on April 29, 2020 Leave a Comment
Currently it is not possible to extend a standard or custom object in Salesforce. Why would you want to do that you may ask, think about the following, how would you check the age of a contact, if they have a mobilephone, sort list of objects, serialize, deserialize, . Define an Obj class that will […]
Posted on April 29, 2020 Leave a Comment
Fun coding challenge from: Show me the code: Extravagant Record Creation Max cases Trigger Max cases helper class Max cases helper test
Posted on February 25, 2020 Leave a Comment
Anagram word search problem Get derivative for Term Non Consecutive sequence with the largest sum Ransome note