Skip to content

Commit f4d85ca

Browse files
solutions
1 parent 4758cc6 commit f4d85ca

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

Python/chapter01/1.1 - Is Unique/camilo_sol.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Implement an algorithm to determine if a string has all unique charactersself.
2-
# What if you cannot use additional data structures.
1+
"""
2+
Is Unique: Implement an algorithm to determine if a string has all unique
3+
characters. What if you cannot use additional data structures?
4+
"""
35

46

57
def isUnique(string_):

Python/chapter01/1.2 - Check Perm/camilo_sol_1.2.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
"""
2+
Check Permutation: Given two strings,write a method to decide if
3+
one is a permutation of the other.
4+
"""
5+
6+
7+
8+
19
def perm_check(str_1,str_2):
210
if len(str_1) != len(str_2):#If both str are diiferent lenghts return false
311
return False
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
URLify: Write a method to replace all spaces in a string with '%20'. You may
3+
assume that the string has sufficient space at the end to hold the additional
4+
characters,and that you are given the "true" length of the string.
5+
(Note: If implementing in Java,please use a character array so that you can
6+
perform this operation in place.)
7+
EXAMPLE
8+
Input: "Mr John Smith ", 13 Output: "Mr%20John%20Smith"
9+
"""
10+
11+
def urlify(str):

Python/chapter01/1.3 - URLify/solution.py

Whitespace-only changes.

0 commit comments

Comments
 (0)