看到的一題

Given $a > 0, a\neq 1$, $\forall n \in \mathbb{N}$, we have

$$ \frac{1+a^2+a^4+\cdots + a^{2n}}{a+a^3+\cdots+a^{2n-1}} > \frac{n+1}{n} $$

有趣的一題

很久以前在 FB 上看到的這題

求證不等式 對於實數 $x$,$\cos(\sin x) > \sin(\cos x)$

0015-3Sum

題目如下:

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.

Notice that the solution set must not contain duplicate triplets.

0175-Combine Two Tables

題目如下:

Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:

FirstName, LastName, City, State

0029-Divide Two Integers

題目如下:

Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.

Return the quotient after dividing dividend by divisor.

The integer division should truncate toward zero, which means losing its fractional part. For example, truncate(8.345) = 8 and truncate(-2.7335) = -2.