Pinned Repositories
add-two-numbers-list-of-digits
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
binary-tree-inorder-traversal
Given a binary tree, return the inorder traversal of its nodes' values.
container-with-most-water
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
find-all-anagrams-in-a-string
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.
GenericTestCaseRunner
generic test case runner for programming challenges
isPalindrome
java implementation of determining if an int is a palindrome
Long-Pressed-Name
Match original string to string with repeated characters
longest-palindromic-substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
minimum-window-substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
Number-of-Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
tiagosilvahub's Repositories
tiagosilvahub/add-two-numbers-list-of-digits
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
tiagosilvahub/binary-tree-inorder-traversal
Given a binary tree, return the inorder traversal of its nodes' values.
tiagosilvahub/container-with-most-water
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
tiagosilvahub/find-all-anagrams-in-a-string
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.
tiagosilvahub/GenericTestCaseRunner
generic test case runner for programming challenges
tiagosilvahub/isPalindrome
java implementation of determining if an int is a palindrome
tiagosilvahub/Long-Pressed-Name
Match original string to string with repeated characters
tiagosilvahub/longest-palindromic-substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
tiagosilvahub/minimum-window-substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
tiagosilvahub/Number-of-Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
tiagosilvahub/Parallel-Multilevel-Monte-Carlo-for-Capacitance-Extraction-in-Non-Manhattan-Geometries
A technique for improving the performance of a Monte Carlo algorithm for capacitance extraction of integrated circuits that allowed to reach a x3 better accuracy after an hour of running time. Near perfectly parallel with 99% speedup per CPU core.
tiagosilvahub/permutation-in-string
Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substring of the second string.
tiagosilvahub/Repeated-Substring-Pattern
Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together
tiagosilvahub/reverse-integer
tiagosilvahub/rotting-oranges
Every minute, any fresh orange that is adjacent (4-directionally) to a rotten orange becomes rotten. Return the minimum number of minutes that must elapse until no cell has a fresh orange. If this is impossible, return -1 instead.
tiagosilvahub/search-suggestions-system
Given an array of strings products and a string searchWord. We want to design a system that suggests at most three product names from products after each character of searchWord is typed. Suggested products should have common prefix with the searchWord. If there are more than three products with a common prefix return the three lexicographically minimums products. Return list of lists of the suggested products after each character of searchWord is typed.
tiagosilvahub/String-Valid-Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
tiagosilvahub/substring-with-concatenation-of-all-words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters.
tiagosilvahub/Top-K-Frequent-Words
Given a non-empty list of words, return the k most frequent elements.
tiagosilvahub/Trapping-Rain-Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
tiagosilvahub/two-sum-array-of-integers
Given an array of integers, return indices of the two numbers such that they add up to a specific target. https://leetcode.com/problems/two-sum/
tiagosilvahub/valid-anagram
Given two strings s and t , write a function to determine if t is an anagram of s.