Skip to content

Latest commit

 

History

History
107 lines (54 loc) · 1.55 KB

RefactorMe.md

File metadata and controls

107 lines (54 loc) · 1.55 KB

List of problems to be refactored

102. Binary Tree Level Order Traversal / 103

Solve using a While loop.

116. Populating Next Right Pointers In Each Node

Do it better.

132. Palindrome Partitioning II

Do it using use dynamic programming (determine which substrings are palindromes).

135. Candy

redo

152. Maximum Product Subarray

redo

164. Maximum Gap

learn bucket sort

188. Best Time to Buy and Sell Stock IV

redo

212. Word Search II

Do it with Tries.

224. Basic Calculator

Do it better.

312. Burst Balloons

redo

316. Remove Duplicate Letters

redo

456. 132 Pattern

redo

460. LFU Cache

The task was solved with a HashMap and an X-doubly linked list. The doubly linked list should be implemented as a class that can be used later.

As an alternative, a solution with OrderedDict should be implemented.

664. Strange Printer

redo

847. Shortest Path Visiting All Nodes

redo

879. Profitable Schemes

redo using DP

880. Decoded String at Index

redo

920. Number of Music Playlists

redo

956. Tallest Billboard

Check sample solution.

958. Check Completeness of a Binary Tree

Check sample solution.

983. Minimum Cost For Tickets

redo

1187. Make Array Strictly Increasing

redo

1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree

redo

2306. Naming a Company

Refactor it. The solution is supposed to be faster and consume less memory.

2608. Shortest Cycle in a Graph

redo with union find

2809. Minimum Time to Make Array Sum At Most x

redo