Day 14 (November 28, 2022)
Accepted
Accepted
- Approach: Convert the number to bits by dividing by 2 until 0, storing the bits into an array. Then walk through the array backward and calculate the decimal representation.
Day 13 (November 26, 2022)
Accepted
Accepted
Day 12 (November 25, 2022)
Accepted
- DP approach. Overview: create a minimum path sum triangle array. Update from the bottom of the triangle
- for each index i on kth row, the minimum path sum would be the minimum betw
- triangle[k][i] + minPathSum[k+1][i]
- triangle[k][i] + minPathSum[k+1][i+1]
Day 11 (November 24, 2022)
Accepted
- Backtrack approach
- Walk through all characters
- if it’s a digit, concatenate the digit to current permutation
- if it’s a letter, create two permutations:
- concatenate the lowercased letter to current permutation
- concatenate the uppercased letter to current permutation
- Stop when number of characters is equal to original string. Return the permutation
Day 11 (November 23, 2022)