This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reverse a given string | |
def reverse(str): | |
l = [] | |
for index, i in enumerate(str): | |
j = len(str)-1 - index | |
l.append(str[j]) | |
return ''.join(l) | |
print reverse("asdaad") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Unique{ | |
public static void main(String [] args){ | |
Unique unique = new Unique(); | |
String[] _args = {"as", "as", "se", "so","so","an","no"}; | |
System.out.println(unique.det(_args)); | |
} | |
public int det(String [] args_){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Determine if an index has been checked | |
def index_not_in(list_of_indices, index): | |
res = True | |
for i in list_of_indices: | |
if index == i: | |
res = False | |
return res | |
# Determine if 2 strings are anagrams | |
def anagram(str1, str2): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Response; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import com.android.volley.toolbox.StringRequest; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; |
NewerOlder