CC Coding
文章平均质量分 70
wbxatlantis
这个作者很懒,什么都没留下…
展开
-
Career Cup 1-5
/******************************************************* Write a method to replace all spaces in a string with ‘%20’ Note: every space is replaced with 3 characters, causing the extension原创 2012-04-21 20:57:40 · 247 阅读 · 0 评论 -
Career Cup 1-4
/******************************************************* Write a method to decide if two strings are anagrams or not. 也就是说纯看字母出现次数咯?与位置无关,字符出现类型和次数相同则为anagram. i.e. transpose letters字原创 2012-04-21 20:49:57 · 324 阅读 · 0 评论 -
Career Cup 2-4
/******************************************************* 2.4 You have two numbers represented by a linked list, where each node contains a sin- gle digit The digits are stored in re原创 2012-05-07 10:14:20 · 309 阅读 · 0 评论 -
Career Cup1-2
先找出字符串的长度,然后两头开始调换。速度很快,为O(n) /********************************************************** Write code to reverse a C-Style String (C-String means that “abcd” is represented as five characte原创 2012-04-21 20:42:09 · 225 阅读 · 0 评论 -
Career Cup 1-1
/************************************** Implement an algorithm to determine if a string has all unique characters What if you can not use additional data structures? Note: this file cannot be原创 2012-04-21 20:34:50 · 311 阅读 · 0 评论 -
Career Cup 1-6
/******************************************************* 1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the im原创 2012-04-22 13:14:49 · 210 阅读 · 0 评论 -
Career Cup 2-3
/******************************************************* 2.3 Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node EXAMPLE原创 2012-05-06 21:50:54 · 255 阅读 · 0 评论 -
Career Cup 2-2
/******************************************************* 2.2 Implement an algorithm to find the nth to last element of a singly linked list. Note: use 2 pointers to traverse t原创 2012-05-06 20:18:24 · 301 阅读 · 0 评论 -
Career Cup 1-3
/******************************************************* Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE:原创 2012-04-21 20:46:45 · 261 阅读 · 0 评论 -
Career Cup 2-1
/******************************************************* 2.1 Write code to remove duplicates from an unsorted linked list FOLLOW UP How would you solve this problem if a tempor原创 2012-05-03 16:58:19 · 316 阅读 · 0 评论 -
Career Cup 1-7
/******************************************************* 1.7 Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0 Note: Some原创 2012-04-23 15:38:22 · 193 阅读 · 0 评论