Free Lines Arrow
본문 바로가기
728x90

전체 글353

[프로그래머스] 이진변환 반복 문제 분석 따로 크게 분석할게 없었다. 단 중요한건 제목부터 이진변환 반복이라는것. 즉 나는 2진변환로직 구현 -> 재귀로 반복 해주었다. 재귀로 계속 반복하다가 더이상 변환할게 없을때 중단 하였다. 구현 #include #include #include using namespace std; void solve(int size, int &delCnt, int &cnvCnt ); vector solution(string s) { vector answer; vector binVector; int delCnt = 0; int cnvCnt = 1; for(int i = 0 ; i < s.size(); i++){ if( s.at(i) == '0'){ delCnt++; } else { binVector.push_ba.. 2021. 6. 14.
[Spring] Bean Scope Prototype: part3 싱글톤과 프로토타입을 같이 사용했을때 문제점 해결 앞에서 싱글톤과 프로토타입을 같이 사용하면 발생되는 문제점을 봤다. https://vprog1215.tistory.com/79 [Spring] Bean Scope Prototype: part2 싱글톤과 프로토타입을 같이 사용했을때 문제점 Bean Scope Prototype: Part1 은 아래 페이지에서 확인하자. https://vprog1215.tistory.com/71 [Spring] Bean Scope Prototype: part1 Bean Scope Prototype: part.. vprog1215.tistory.com Provider 로 해결하는 방법을 알아보자 Spring 의 Provider 기능 사용. 스프링에서 제공해 주는 Provider.. 2021. 6. 14.
[C++] string contains string contains c++ 에는 아쉽게도 String 의 contains 기능이 없다. 간단하게 한줄로 구현이 가능하다. 1. cplusplus 에서 사용한 방법 std::string str ("Who Am I"); std::string str2 ("Am"); // different member versions of find in the same order as above: std::size_t found = str.find(str2); if (found!=std::string::npos) std::cout 2021. 6. 12.
[Spring] Bean Scope Prototype: part2 싱글톤과 프로토타입을 같이 사용했을때 문제점 Bean Scope Prototype: Part1 은 아래 페이지에서 확인하자. https://vprog1215.tistory.com/71 [Spring] Bean Scope Prototype: part1 Bean Scope Prototype: part1 Bean Scope의 종류중 하나인 ProtoType 을 알아보자 Bean Scope의 정의는 아래 페이지를 참고하자. https://vprog1215.tistory.com/70?category=989392 [Spring] Bean Scope Bean Sco.. vprog1215.tistory.com 싱글톤과 프로토 타입을 같이 사용했을때 문제점을 알아보자. 싱글톤빈 안에 프로토타입 빈이 있음. 프로토타입 빈.. 2021. 6. 12.
728x90
반응형