- 博客(11)
- 收藏
- 关注
原创 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 304
原创 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 248
原创 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 297
原创 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 311
原创 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 188
原创 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 203
原创 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 241
原创 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 320
原创 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 255
原创 Career Cup1-2
先找出字符串的长度,然后两头开始调换。速度很快,为O(n)/********************************************************** Write code to reverse a C-Style String (C-String means that “abcd” is represented asfive characte
2012-04-21 20:42:09 218
原创 Career Cup 1-1
/**************************************Implement an algorithm to determine if a string has all unique characters What if youcan not use additional data structures?Note: this file cannot be
2012-04-21 20:34:50 303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人