自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

转载 iOS objc_setAssociatedObject 关联对象的学习

iOS objc_setAssociatedObject 关联对象的学习本文引用地址:https://www.cnblogs.com/someonelikeyou/p/7162613.html 觉得写的很不错 转发过来,方便以后查看主要函数:void objc_setAssociatedObject(id object, const void *key, id value, objc_...

2018-04-22 10:47:23 361

原创 JAVA环境变量

相信很多第一次接触Java语言的时候,都会觉得Java为什么这么麻烦,下载完jdk还得要配置一系列的环境变量才能很方便的使用,然后就是用Google“Java环境变量的配置”然后出来好多教程,跟着教程走一遍,OK。所以我这里不准备将怎么在自己的电脑上面配置环境变量了 然而,那几个变量你有没有真正了解为什么要设置它呢,相信好多人没有。我觉得当你理解一个东西的时候,你就真的掌握了Java环境变

2017-01-17 11:18:56 286

原创 Decode Ways

Problem description: A message contain letters form A-Z is being encoded to numbers using the following mapping: ‘A’ -> 1 ‘B’ -> 2 ‘Z’ -> 26 Given an encoded message containing dig

2017-01-17 10:33:33 213

原创 Remove Duplicates from Sorted Array II

Problem Descriptions: Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your function should r

2016-12-20 01:17:40 229

原创 二分查找的实现

Discription on Binary SearchThe binary search algorithm is used to search an element in the sorted array. It’s faster than linear search and improves perfomance from O(n) to O(logN) for searching an e

2016-12-19 17:16:23 443

原创 Java学习记录01

构造代码块 一个class里面出现一个大括号里面包含一些代码的东西,我们称之为构造代码块 , 构造代码块是先于构造函数执行的,用来初始化个对象共有的内容。而构造函数是用来给相应的对象初始化的。 class Person{ private int age; private String name; //构造代码块,每一个人对象建立的时候都是哭

2016-12-13 00:54:13 176

原创 Merge Sorted Lists and Merge Sorted Arrays

1.问题描述:Merge two sorted lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.分析: 这个问题是让操作两个有序的链表,由于操作链表其实就是改变节点之间的指针的指向,所以直接按要求修改节点之间的指针就

2016-12-09 17:27:18 374

原创 Different Between An Interface and An Abstract Class

What is the different between an interface and an abstract class in Java?It is best to start answering this question with a brief definition of abstract classes and interfaces and then explore t

2016-11-21 15:30:43 401

原创 Reverse Nodes in k-Group

Reverse Nodes in k-Group问题描述:Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out

2016-11-19 21:41:07 266

原创 Final 修饰符

In Java, what does the ‘final’ modifier mean when applied to a method, class, and an instance variable?When applied to a method definition the final modifier indicates that the method may not be o

2016-11-09 14:43:36 330

转载 Java中String类的一些理解

今天要介绍的String类是一个不可变的对象(immutable object),由名字我们可以看出来:不可变对象就是创建之后不可以改变的对象

2016-11-09 13:51:07 430

原创 Java语言跨平台和JVM的理解

该部分转自CSDN上另一位作者的连接如下:点击打开链接1、是么是平台Java是可以跨平台的编程语言,那我们首先得知道什么是平台,我们把CPU处理器与操作系统的整体叫平台。CPU大家都知道,如果计算机是人,那CPU就是人的大脑,它既负责思维运算,又负责身体各部件的命令控制。CPU的种类很多,除去我们熟知的Intel与AMD外,还有比如上面说到的SUN的Sparc,比如IBM的Po

2016-11-08 15:19:56 4185

原创 Basic Calculator

问题描述:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative intege

2016-06-04 01:18:59 195

原创 Contains Duplicate

问题描述:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every e

2016-05-09 00:19:04 190

原创 C++ map的使用总结

说到C++中的Map这个容器,如果你以前接触过其他高级编程语言,比如C#,Object-C等等,其实这个东西就是字典Dictionary。提供一种键值对,听说C++中的这个MAP底层是用红黑树这种很牛逼的数据结构实现的,红黑树大部分数据结构的书都会提到,但都会简单的一笔带过。因为真的不是人人都能学会的,,,好了,接着说我们的map1、要用这个map的话,你必须包含他的头文件#inclu

2016-05-08 11:31:39 485

原创 Move Zeroes

LeetCode Move Zeroes

2016-05-07 18:06:17 264

原创 Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5分析:这个问题肯定是的有两个指针,一个指向当

2016-05-07 16:58:37 703

原创 Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with

2016-05-07 16:45:10 177

原创 数据结构之表

线形表分为:顺序存储(顺序表)和链式存储(链表)。而顺序表有分为:静态存储和动态存储,静态存储借助了一维数组来实现#define maxSize 10typedef int DataType;typedef struct {DataType data[maxSize];int n;}SeqList动态存储实现如下#define initSize 10type

2016-05-04 20:14:44 257

原创 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2016-04-04 22:48:04 262

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除