-
Stock Maximize - given a list of prices for stock price on consecutive days, you can either buy one stock or sell as many stocks or do nothing on each day; return the max money you can make. https://www.hackerrank.com/challenges/stockmax
-
Binary Tree Paths - given a binary tree, return array of all tree paths. https://leetcode.com/problems/binary-tree-paths/
-
Connected Cells in a Grid - given a matrix of 1s and 0s, return size of largest connected 1s. https://www.hackerrank.com/challenges/connected-cell-in-a-grid
-
Pairs - give a list of unique numbers and a difference, return number of pairs that is different by the difference. https://www.hackerrank.com/challenges/pairs
-
Integer to English Words - given an integer, return the english word version of it. https://leetcode.com/problems/integer-to-english-words
-
Best time to sell and buy stock - given a list of prices for stock prices on consecutive days, choose one day to buy 1 stock and one day to sell that stock to maximize profit. https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
- Merge Sorted Array - Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array in place. https://leetcode.com/problems/merge-sorted-array/
- Multipy Two Sums - Given two strings, each contains chars from "0"-"9" and up to 110 characters long, return their product. Cannot use big int. https://leetcode.com/problems/multiply-strings/
-- suspended because working on AI project
- Valid Palindrome - given a string, find if it's a valid palindrome, ignoring non alphanumeric values. https://leetcode.com/problems/valid-palindrome/
Practicing SQLs on Leetcode 10. Combine Two Tables - Write a SQL query for a report that provides name and address for each person in the Person table, regardless if there is an address for each of those people. Address and Person is two separate tables. https://leetcode.com/problems/combine-two-tables
-
Second Highest Salary- an SQL query for the second highest listed salary from an Employees(id, salary) table. https://leetcode.com/problems/second-highest-salary
-
Substrings sum - return sum of substrings of an input; eg. input: "1234" output: 1 + 2 + 3 + 4 + 12 + 23 + 34 + 123 + 234 + 1234 mod (10^9 + 7). Input is smaller than 2*10^5. https://www.hackerrank.com/challenges/sam-and-substrings
-
Substrings sum - same problem as #12, different implementation.
- Reverse String - as the name suggests https://leetcode.com/problems/reverse-string/
- Nim Game - 2 player game where players take turn removing stones from a heap. In each turn 1, 2, or 3 stones may be removed. Return whether or not a player would be able to win, given the number of stones in the heap and that the player always goes first. https://leetcode.com/problems/nim-game/
-
Single Number - Given an array of integers, every element appears twice except for one. Find that single one. https://leetcode.com/problems/single-number/
-
Add Two Numbers - 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. https://leetcode.com/problems/add-two-numbers/
-
ZigZag Conversion - Given a string and number of rows, write the string in a zigzag spread across the said number of rows. https://leetcode.com/problems/zigzag-conversion/
-
Weighted List - Given a nested list of integers, return the sum of all integers in the list weighted by their depth. https://leetcode.com/problems/nested-list-weight-sum/
-
Insert Delete GetRandom - Implement a data structure that does operations insert, delete, and getRandom in O(1) time. https://leetcode.com/problems/insert-delete-getrandom-o1/
-
Coin Change - How many different ways can you make change for an amount, given a list of coins? https://www.hackerrank.com/challenges/coin-change
-
Merge Intervals - Given a collection of intervals, merge all overlapping intervals. https://leetcode.com/problems/merge-intervals
-
Group Anagrams - Given an array of strings, group anagrams together. https://leetcode.com/problems/anagrams/
-
Flatten 2D Vector - Implement an iterator to flatten a 2d vector. https://leetcode.com/problems/flatten-2d-vector/
-
N puzzle - A* search to solve an N puzzle https://www.hackerrank.com/challenges/n-puzzle
-
Invert Binary Tree - invert a binary tree https://leetcode.com/problems/invert-binary-tree/
-
Find max depth - find max depth of a binary tree https://leetcode.com/problems/maximum-depth-of-binary-tree/
-
Same tree - given 2 binary trees, check if they're numerically and structurally the same https://leetcode.com/problems/same-tree/
-
Max in a row - You need to find the largest value in each row of a binary tree. https://leetcode.com/problems/find-largest-value-in-each-tree-row/
-
Find Bottom Left Tree Value - Given a binary tree, find the leftmost value in the last row of the tree. https://leetcode.com/problems/find-bottom-left-tree-value/
-
Convert BST to Greater Tree - Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. https://leetcode.com/problems/convert-bst-to-greater-tree/
-
Find leaves of binary tree - Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. https://leetcode.com/problems/find-leaves-of-binary-tree/
-
Happy Num - https://leetcode.com/problems/happy-number/
- Find Lowest Common Ancestor for BST https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
- First Bad Version - given a number n, and knowing that if a version is bad then subsequent versions are bad, find the bad version with least number of calls to API isBadVersion(n) https://leetcode.com/problems/first-bad-version/
- Binary Search Tree Iterator - call next() and hasNext() to iterate over a binary search tree, in ascending order of the values. Has average O(1) run time and O(h) memory where h is height of tree. https://leetcode.com/problems/binary-search-tree-iterator/