https://www.hiredintech.com/classrooms/system-design/lesson/56 – this is the link to the original course. Below is the written down information which interested me in some way. Use cases Speaking of the idea of the original service. We can think of two main features: shortening – when we get a link and we need to convert it to a short…
Conserve your keystrokes – personal productivity
Conserve your keystrokes. In this video, the author is mentioning the idea that you can represent your time (rather how much time you have left) in keystrokes. Actually, literally in everything (eg. he gave an example in cups of coffee). There is this website https://keysleft.com/ you can put there your age and your typing speed…
Leetcode daily. 53. Maximum Subarray; 152. Maximum Product Subarray
Original problem – https://leetcode.com/problems/maximum-subarray/ Original problem – https://leetcode.com/problems/maximum-product-subarray/ Github solution Additional materials https://en.wikipedia.org/wiki/Maximum_subarray_problem#Kadane’s_algorithm Problem definition. 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…
Leetcode daily. 238. Product of Array Except Self
Original problem – https://leetcode.com/problems/to-lower-case/ Github solution Problem definition Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm…
Leetcode daily. 709. To Lower Case
Original problem – https://leetcode.com/problems/to-lower-case/ Github solution && Github unit tests Problem description Given a string s, return the string after replacing every uppercase letter with the same lowercase letter. Example 1: Input: s = “Hello” Output: “hello” Example 2: Input: s = “here” Output: “here” Example 3: Input: s = “LOVELY” Output: “lovely” Solution The…
Leetcode daily. 973. K closest points to origin.
Original problem – https://leetcode.com/problems/k-closest-points-to-origin Github solution && Github unit tests Problem description We have an array of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclidean distance.) You may return the answer in any order. The answer is guaranteed to be…
Remote server PostgreSQL setup v 12+ (CentOS)
I’m not currently sure that it is a good idea to expose connection to anyone regarding security reasons. So basically we have several options on how to restore the database. Since we are not able to connect to our remote database from the local machine we have to use ssh and restore the database on…
How to send authorization request via SWIFT
Let’s say you are going to implement your pet project using REST web-services. At some point, you may come to a decision that you would like to have a mobile application. Probably, you have a budget limitation or whatever. Let’s say you’ve decided to implement such an application on your own. Good for you. But…
Digest August 2019
Books To be honest I don’t know whether this book was translated into English or not but if it was it’s definitely worth reading. It is a collection of various techniques and approaches on how to manage your time and increase your productivity. As a matter of fact, this book does not reveal any unexpectedly…
Scala Enumerations
Scala 2 does not contain anything like enums in Java. But it has class Enumeration. In terms of best practices, it’s better not to use such a class. Fortunately, Scala 3 is going to include new keyword enum such as in java which represents widely known enum classes. In some cases Enumerations might be used…