摘要:
Question Given a list, rotate the list to the right by k places, where k is non negative. Example Given and , return . Code 阅读全文
摘要:
Question Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1 2 3 4, you should return the list as 2 1 4 3. Yo 阅读全文
摘要:
Question There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you togg 阅读全文
摘要:
protected的使用范围
类NewObject中有protected修饰的方法或者属性,则: 同一个包中: 1. 可在同一个包里的子类中实例化 类获得对象,然后可用该对象访问protected修饰的方法或者属性,即 操作访问。 2. 可在同一个包里的非子类中实例化 类获得对象,然... 阅读全文
摘要:
##if语句不需要将正在检查的表达式放到括号内。```if 1+1 == 2 { println("The math checks out")}```所有if语句的主体都要放在大括号内。```if(something) do_something();```判断optional类型中是... 阅读全文
摘要:
[TOC]# CSS选择器## 标签选择器html代码中的标签## 类选择器### 语法```.类选择器名称{CSS样式代码;}```### 使用方法1. 使用合适的标签把要修饰的内容标记起来2. 使用class="类选择器名称"为标签设置一个类3. 设置类选择器CSS样式## ID选择器###语法... 阅读全文
摘要:
JavaScript的作用是为网页提供动态效果基础如何插入JS语法:引用外部JS文件javascript代码写在.js文件中语法:JS在页面中的位置html解释器顺序解析html代码,因此js放到不同位置执行顺序不同放在部分,如初始化的js放在部分,如通过事件调用执行的function对位置没要求语... 阅读全文