­

[Leetcode] Power of Two

Given an integer, write a function to determine if it is a power of two.

November 14th, 2015|Categories: Bit Manipulation, DS and Algorithms, Math|Tags: , , , |

[Leetcode] Reverse Integer

Reverse digits of an integer. Return 0 when the reversed integer overflows.

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

[Leetcode] Add Binary

Given two binary strings, return their sum (also a binary string).

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

[Leetcode] Plus One

Given a non-negative number represented as an array of digits, plus one to the number.

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

[Leetcode] Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has.

November 14th, 2015|Categories: Bit Manipulation, DS and Algorithms, Math|Tags: , , , |

[Leetcode] Add Digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.

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

[Leetcode] Integer to Roman

Given an integer, convert it to a roman numeral.

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

[Leetcode] Roman to Integer

Given a roman numeral, convert it to an integer.

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

[Leetcode] Happy Number

Write an algorithm to determine if a number is "happy".

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

[Leetcode] Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string.

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

[Leetcode] Rectangle Area

Find the total area covered by two rectilinear rectangles in a 2D plane.

November 17th, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Basic Calculator

Implement a basic calculator to evaluate a simple expression string.

November 22nd, 2015|Categories: DS and Algorithms, Math, Stack|Tags: , , |

[Leetcode] Basic Calculator II

Implement a basic calculator to evaluate a simple expression string with '+','-','*','/'.

November 22nd, 2015|Categories: DS and Algorithms, Math, Stack|Tags: , , |

[Leetcode] Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.

November 22nd, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Excel Sheet Column Number

Given a column title as appear in an Excel sheet, return its corresponding column number.

November 23rd, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Fraction to Recurring Decimal

Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional [...]

November 23rd, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Count Primes

Count the number of prime numbers less than a non-negative number, n.

November 29th, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Ugly Number

Write a program to check whether a given number is an ugly number.

November 29th, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Ugly Number II

Write a program to find the n-th ugly number.

November 29th, 2015|Categories: DS and Algorithms, Math|Tags: , , |

[Leetcode] String to Integer (atoi)

Implement atoi to convert a string to an integer.

December 4th, 2015|Categories: DS and Algorithms, Math, String|Tags: , , , |

[Leetcode] Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.

December 5th, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Nim Game

Determine if you could win a Nim Game

December 5th, 2015|Categories: DS and Algorithms, Math|Tags: , , , |

[Leetcode] Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.

December 9th, 2015|Categories: Math|Tags: , , , |