自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 LeetCode-35-java

class Solution { public int searchInsert(int[] nums, int target) { int len = nums.length; for (int i = 0; i < len; i++) { if (nums[i] < target ){ continue; }else if (nums[i] == target){ .

2021-04-21 20:48:01 97

原创 LeetCode-28-java

边界条件: 1.当标准数组为0 的时候返回0 2.当主数组长度小于标准数组长度的时候返回-1 3.当主数组与标准数组比较的时候注意主数组剩余队列的长度 class Solution { public int strStr(String haystack, String needle) { if (needle.length() == 0) return 0; // System.out.printl...

2021-04-16 23:18:45 104

原创 LeetCode-14-java

1.java二维数组声名:char[][] x = new char[][]; 2.作为可变长度的StringBuffer可以使用 .append();方法添加内容,使用 .toString();返回String类型 3.二维数组其中任意一维返回长度需要使用.length();方法,返回二维数组的整体长度使用.length就可以了 class Solution { public String longestCommonPrefix(String[] strs) { StringBuf

2021-04-15 18:25:33 75

原创 LeetCode-13-C

int romanToInt(char * s){ int sum = 0; for (int i = 0; s[i] != '\0' ; i++) { switch (s[i]){ case 'I': if (s[i+1] != '\0' && s[i+1] == 'V'){ sum += 4; .

2021-04-15 15:36:24 67

原创 LeetCode-13-java

问题1: java switch语句 switch(expression){ case value : //语句 break; //可选 case value : //语句 break; //可选 //你可以有任意数量的case语句 default : //可选 //语句 } 问题二:String类型和char类型的转换 String转换为char 1. 使用String.charAt(inde

2021-04-14 22:36:29 91

原创 洛谷P1055

用C语言实现 注意一下当给出验证值为X 时的情况#include &lt;stdio.h&gt;int main (){ char ch[20]; int i, sum = 0; int n = 0; int m; /*FILE *fp; fp = fopen("111.txt", "r"); fgets(ch, 14, fp);*/ gets(ch); for (i = 0; i &lt; ...

2018-06-13 16:44:40 1005

原创 pycharm的小技巧

在pycharm编写程序中需要将光标移动到“” 或‘’号外。实现的方式就是在输入一次“”或‘’在代码中将直接移动到后面那个引号的后面  方便输入  这种方式也可以使用于括号 编写中也需要换行,但是有时光标正处于居中  可以使用shift+enter 自动从句中换到下一行句首。

2018-01-28 17:16:17 2389

空空如也

空空如也

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

TA关注的人

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