我们在做sql更新时,为防止sql重复执行报错,需要对所需要执行的对象进行判断是否存在: 常用判断脚本如下: 判断视图是否存在 IF object_id('viewname') IS not NULL begin --操作 --drop view viewname end 判断表是否存在 IF object_id('tablename') IS NULL BEGIN --操作 END 判断列是否存在 FROM dbo.syscolumns WHERE [name]='columnname' AN…
题目: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could…
Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 思路: 1. 利用快慢指针找到链表中点 2.从中点开始反转链表,判断是否相等. class Solution { public boolean isPalindrome(ListNode head) { ListNode faster= head ,slower= h…