Tag: leetcode
Given a text file file.txt, transpose its content. You may assume that each row has the same number of columns and each field is separated by the ‘ ‘ …
Given an integer, write a function to determine if it is a power of two. This is not new, and the solution has been posted at Using a Faster …
Regular Expressions (Regex) are very powerful and useful tool to describe patterns. https://leetcode.com/problems/valid-phone-numbers/ Given a text file file.txt that contains list of phone numbers (one per line), write a …
Submit your SQL to Leetcode online judge: https://oj.leetcode.com/problems/rank-scores/ Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. …
Remember a couple days ago, I write a solution to this puzzle using Dynamic Programming (DP)? The DP solution helps to avoid duplicate computation in the sub-problems (smaller size). …