題目

  Given a roman numberal, convert it to an interger.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

Question

  Given a binary tree, return the preorder traversal of its nodes' values.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

問題

  Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magines; otherwise, it will return false.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

題目

  Given a word, you need to judge whether the usage of capitals in it is right or not.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

題目

  Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

Invert a binary tree

     4
   /   \
  2     7
 / \   / \
1   3 6   9

to

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

題目

  Given two binary trees, write a function to check if they are equal or not.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

題目

  Given a binary tree, return the inorder traversal of its nodes' values.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

問題

  Given an array `nums`, write a function to move all `0`'s to the end of it while maintaining the relative order of the non-zero elements.

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()

題目

  Reverse a singly linked list

文章標籤

Davis 發表在 痞客邦 留言(0) 人氣()