Concerns about SW Architecture in a Startup

(This article is a re-post from my post in July 2016.) Working alone as a full-stack developer in a business, my biggest concern was, “What am I actually developing?” Without an overall architecture, I blindly trusted a full-stack framework and excitedly developed, but when I looked back, I hadn’t made any progress. It’s strange, a ...

Fast development or future-oriented development?

In the world of development, I’m all about achieving maximum performance with minimal resources, all while keeping a keen eye on scalability. That’s why microservice architecture has become my go-to choice. By automatically scaling Docker resources to meet global demand, the hassles of server expansions and co-location become a thing of the past. Cloud platforms ...

[LC] 25.Reverse Nodes in k-Group (Hard, Recursive, LinkedList)

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is. ...

Web Development and Data Structure: What’s Inside

As a graduate student, I’m interviewing with some companies. These days, I feel the demand for SWE is pretty much lower than the previous. I don’t want to believe that’s the reason why all of the companies who contacted me are looking for the senior position, and I conducted one interview with company ‘A’ last ...

[LC] 21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists. Example 1: Input: l1 = [1,2,4], l2 = [1,3,4] Output: [1,1,2,3,4,4] Example 2: Input: l1 = [], l2 = [] Output: [] Example 3: Input: l1 = [], l2 = ...

[LC] 253. Meeting Rooms II

Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. Example 1: Input: intervals = [[0,30],[5,10],[15,20]] Output: 2 Example 2: Input: intervals = [[7,10],[2,4]] Output: 1 Constraints: 1 <= intervals.length <= 104 0 <= starti < endi <= 106 Approach It is another problem I spent about 5 hours until midnight ...

[LC] 206. Reverse Linked List

Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? Approach It is another problem I spent about 3 hours though it is in “easy” category. I’ve solved it about 20 times before but every time when I was ...

[LC] 53. Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6. Example 2: Input: nums = [1] Output: 1 Example 3: Input: nums = [0] Output: 0 Example 4: ...

[LC] 238. Product of Array Except Self

Given an array nums of n integers where n > 1,  return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Example: Input: [1,2,3,4] Output: [24,12,8,6] Constraint: It’s guaranteed that the product of the elements of any prefix or suffix of the array (including the whole array) fits in a 32 bit integer. Note: Please solve it without division and in O(n). ...

[LC] 121. Best Time to Buy and Sell Stock

You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0. Example 1: Input: ...