Skip to content

Instantly share code, notes, and snippets.

View WeAthFoLD's full-sized avatar

WeAthFoLD

View GitHub Profile
class Solution {
func isPalindrome(_ x: Int) -> Bool {
var y: String = x.description
if x < 0 {
return false
}
var count = y.characters.count
for i in 0..<count/2{
guard y.characters.removeFirst() == y.characters.removeLast() else{
@WeAthFoLD
WeAthFoLD / RemoveDuplicatesFromSortedList.java
Created April 16, 2017 15:33
Remove Duplicates from Sorted List
/**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/
public class Solution {
public ListNode deleteDuplicates(ListNode head) {