public List<Integer> lexicalOrder(int n) {
		LinkedList<Integer> list = new LinkedList<Integer>();
		LinkedList<String> string = new LinkedList<>();
		for (int i = 1; i <= n; i++) {
			string.add(String.valueOf(n));
		}
		string.sort(new Comparator<String>() {
			@Override
			public int compare(String o1, String o2) {
				for (int i = 0; i < o1.length() && i < o2.length(); i++) {
					if (o1.charAt(i) < o2.charAt(i))
						return -1;
					else if (o1.charAt(i) > o2.charAt(i))
						return 1;
				}
				return o1.length() < o2.length() ? -1 : o1.length() > o2.length() ? 1 : 0;
			}
		});
		for(int i=0;i<string.size();i++){
			list.add(Integer.parseInt(string.get(i)));
		}
		return list;
	}