C
jessica-Jiang
学生
展开
-
【华为OJ平台练习题】求最后一个单词长度
【华为OJ平台练习题】求最后一个单词长度最近学c语言,觉得很单调,就开始刷题~华为的题我实在刷不过啊,本地编辑器都没问题的,但是每次都显示测试用例两个不通过!求大神帮忙解答啊~代码如下#include<stdio.h> #include<string.h> void length(char *str) { char *last = str; while(*str)原创 2016-07-21 17:26:15 · 463 阅读 · 0 评论 -
[LeetCode练习题-C语言]之 Move Zeros
[LeetCode练习题-C语言版]之 Move Zeros题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0,原创 2016-07-22 15:03:36 · 573 阅读 · 0 评论 -
[LeetCode练习题-C语言]203. Remove Linked List Elements
[LeetCode练习题-C语言]203. 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 –>原创 2016-07-25 21:01:57 · 367 阅读 · 0 评论 -
[LeetCode练习题-C语言]242. Valid Anagram
[LeetCode练习题-C语言]242. Valid Anagram题目Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = “anagram”, t = “nagaram”, return true.s = “rat”, t = “car”, retur原创 2016-07-26 11:41:02 · 384 阅读 · 0 评论 -
[LeetCode练习题-C语言]100. Same Tree
[LeetCode练习题-C语言]100. Same Tree题目Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have t原创 2016-07-26 16:12:57 · 805 阅读 · 0 评论 -
[LeetCode练习题-C语言]168. Excel Sheet Column Title
[LeetCode练习题-C语言]168. Excel Sheet Column Title题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example:1 -> A2 -> B3 -> C...26 -> Z27 -> AA28 -> A原创 2016-07-27 13:07:06 · 609 阅读 · 0 评论 -
[LeetCode练习题-C语言]169. Majority Element
[LeetCode练习题-C语言]169. Majority Element题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is no原创 2016-07-27 15:34:04 · 488 阅读 · 0 评论 -
[LeetCode练习题-C语言] 25. Reverse Nodes in k-Group
[LeetCode练习题-C语言]25. 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-原创 2016-08-01 15:36:00 · 431 阅读 · 0 评论