Skip to content

leehyeongrak/Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm

Java

문자열 입력

  • BufferedReader, StringTokenizer ...

  • BufferedReader br = new BufferReader(new InputStreamReader(System.in));
    String s = br.readLine();
    StringTokenizer st = new StringTokenizer(s);
    String word = st.nextToken();
    int number = Integer.parseInt(st.nextToken());
    …

문자열 출력

  • BufferedWriter, StringBuilder ...

  • BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
    StringBuilder sb = new StringBuilder();
    sb.append(“A”);
    sb.append(“B”);
    bw.write(String.valueOf(sb));
    bw.flush();
    bw.close();
    …

문자열 다루기

  • split, substring, CharAt, toCharArray ...

  • String.substring(start)
    String.substring(start, end)
    …

자료구조

  • Stack

  • import java.util.Stack;
    
    Stack<T> stack = new Stack<T>();
    stack.push(item);
    stack.peek();
    stack.pop();
    stack.size();
    …
  • HashSet

  • import java.util.Set;
    import java.util.HashSet;
    
    Set<T> set = new HashSet<T>();
    set.add(item);
    boolean isContain = set.contains(item);
    …
  • HashMap

  • import java.util.HashMap;
    
    HashMap<K, V> map = new HashMap<K, V>();
    map.put(key, value);
    boolean isContain = map.containsKey(key);
    …

About

알고리즘 공부

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages