Can we host MERN Application on cPanel?Yes, it is possible to host a MERN stack application on a cPanel web hosting account, but it requires some additional configuration steps. Here are the general steps to follow: First, you need to make sure that your cPanel account supports Node.js. ...May 16, 2023·2 min read
LC: 121 Best Time To Buy and Sell Stock IInput: prices = [7,1,5,3,6,4] Output: 5 Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5. Note that buying on day 2 and selling on day 1 is not allowed because you must buy before you sell. Here's a breakdown of ...Apr 17, 2023·2 min read
Optimizing Formik in React Native: Best Coding PracticesHere are some best coding practices to follow when using Formik in React Native: Use props to pass initialValues and onSubmit function to the Formik component, and extract the validate function and other configuration options to the component that r...Mar 31, 2023·2 min read
Commonly used components in Linked List ✔️Here's a basic example of a linked list in JavaScript, with explanations at each step: kotlinCopy code// Define the Node class to represent each node in the linked list class Node { constructor(value) { this.value = value; this.next = null;...Mar 28, 2023·3 min read
Constructors in Javascript, Back to basics (BTB) 🦅In JavaScript, a constructor is a function that is used to create and initialize objects. When a constructor is called with the "new" keyword, it creates a new object and sets the "this" keyword to reference that object. The constructor can then set ...Mar 28, 2023·2 min read
Leetcode Array 1: Two Sum - Recap and Tips for Success 🏄🚀🪐const nums = [2, 7, 11, 15]; const target = 9; const twoSum = function(nums, target) { const hashTable = {}; //created a hashtable for (let i = 0; i < nums.length; i++) { if (hashTable[target - nums[i]] !== undefined) { return...Mar 28, 2023·2 min read
Solving the printing time puzzle on a circular printer. 🚀🏄🪐The question involves calculating the time taken to print a given string, where each character is located on a directionless printer and the pointer moves from one character to another in one second. With the input string "AZGB", the index of 'A' is ...Mar 24, 2023·3 min read