摘要:
呜呜呜~要感动cry了,提交了AC解答后,beats 100% of java submissions!!第一次感受到coding和algorithm带给人的愉悦感,加油加油啊~Quesion:Given a sorted integer array without duplicates, retu... 阅读全文
摘要:
Question:Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three intege... 阅读全文
该文被密码保护。 阅读全文
摘要:
Question:Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No... 阅读全文
摘要:
Question: Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives t... 阅读全文
摘要:
Question: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of... 阅读全文
摘要:
Question:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2... 阅读全文
摘要:
Given an integer, write a function to determine if it is a power of two.Analysis: 给出一个整数,判断是否为2的幂方。依次除以2,若某次中余数不为0,则不是二的幂方。Answer: public boolean i... 阅读全文
摘要:
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... 阅读全文
摘要:
Note:This is an extension ofHouse Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that h... 阅读全文