摘要: Given an integer, write a function to determine if it is a power of two.Analysis: 给出一个整数,判断是否为2的幂方。依次除以2,若某次中余数不为0,则不是二的幂方。Answer: public boolean i... 阅读全文
posted @ 2015-09-05 22:00 江湖小妞 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur... 阅读全文
posted @ 2015-09-05 10:47 江湖小妞 阅读(205) 评论(0) 推荐(0) 编辑