Apr 4AWS — S3 bucket security with TerraformAWS S3 is an object storage that many industries choose it becaue of the high availability, ease to use, and the cheap price that AWS provides. However, when it comes to production, security always has more priority than any other factors. …AWS4 min read
Mar 28Golang — basic unit testing and benchmarkingTesting Package Golang is well known for writing unit tests easily. It all thanks to the built-in package testing : https://pkg.go.dev/testing. In this package, we can write simple unit tests and benchmarks to not only keep the source code bug free but also monitor the performance. Unit tests File location There’s a conventional pattern for the…Golang2 min read
Mar 8Leetcode — anagramEasy — medium — Definition From Wikipedia, an anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Leetcode related questions Valid Anagram Find Anagram Mappings Minimum Number of Steps to Make Two Strings Anagram Minimum Number of Steps to Make Two Strings Anagram II Group Anagrams Find…Leetcode2 min read
Mar 7AWS — Configure a lambda function inside a VPC with internet accessAWS has been used by more and more industries due to the stable cloud service with guaranteed high availability. Among all the services that AWS provided, the lambda function is an extremely important piece to automate the business logic. What is a lambda function Lambda function is a serverless, event driven compute service that you…AWS3 min read
Oct 8, 2021Leetcode — reservoir samplingThis is a very small topic in all bunch of Leetcode problems, and I found that even for some problems that are labeled with reservoir sampling, you cannot use this method because it will gives you TLE. So what problem is reservoir sampling trying to solve? …Leetcode2 min read
Jul 8, 2021Leetcode — topological sortLeet code problems course schedule I: check cycle course schedule II: rearrange the course parallel courses: max depth There are two ways of doing this (DFS, BFS). For both ways we have to first construct a graph: ArrayList[] graph = new ArrayList[n]; for (int i=0;i<n;i++) { graph[i] = new ArrayList<Integer>(); } for (int[] r …Leetcode1 min read