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 java.util.Scanner; | |
public class Solution { | |
public static String getSmallestAndLargest(String s, int k) { | |
String smallest = ""; | |
String largest = ""; | |
smallest = s.substring(0,k); | |
largest = s.substring(0,k); | |
// "Compare to" method doesn't turn just the equel case it also turns a value. | |
for(int i=0; i<=s.length()-k; i++ ){ | |
String str = s.substring(i,k+i); |
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
sudo apt-get install uml-utilities build-essential linux-headers-`uname -r` | |
mkdir faketun | |
cd faketun | |
echo -e "#include <linux/module.h>\nstatic int start__module(void) {return 0;}\nstatic void end__module(void){return;}\nmodule_init(start__module);\nmodule_exit(end__module);">tun.c | |
echo -e "obj-m += tun.o\nall:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) modules\nclean:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) clean\nclean-files := Module.symvers">Makefile | |
make | |
sudo install tun.ko /lib/modules/`uname -r`/kernel/net/tun.ko | |
sudo depmod -a | |
sudo modprobe tun |