Hard

/Tag:Hard
­

[Leetcode] Find the Duplicate Number

Find a duplicate in an array with some other requirements.

November 14th, 2015|Categories: DS and Algorithms, Searching|Tags: , , , |

[Leetcode] Rotate Array

Rotate an array of n elements to the right by k steps.

November 14th, 2015|Categories: Array, DS and Algorithms|Tags: , , , |

[Leetcode] Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.

November 14th, 2015|Categories: DS and Algorithms, Dynamic Programming|Tags: , , , |

[Leetcode] Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.

[Leetcode] Single Number II

Given an array of integers, every element appears three times except for one. Find that single one.

November 25th, 2015|Categories: Bit Manipulation, DS and Algorithms, Hash|Tags: , , , |

[Leetcode] Best Time to Buy and Sell Stock III

Given an array for which the ith element is the price of a given stock on day i, design an algorithm to find the maximum profit if you may complete at most 2 transactions.

December 13th, 2015|Categories: DS and Algorithms, Dynamic Programming|Tags: , , , |

[Leetcode] Best Time to Buy and Sell Stock IV

Given an array for which the ith element is the price of a given stock on day i, design an algorithm to find the maximum profit if you may complete at most k transactions.

December 14th, 2015|Categories: DS and Algorithms, Dynamic Programming|Tags: , , , , |