<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[yangzhuhappy的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/yangzhuhappy</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; yangzhuhappy]]></copyright><item><title><![CDATA[Sorted Merge java 走地牙 CTCI 10.1]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89597170</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89597170</guid><author>yangzhuhappy</author><pubDate>Sat, 27 Apr 2019 04:27:01 +0800</pubDate><description><![CDATA[public class Solution {
  /*
  * @param A: sorted integer array A which has m elements, but size of A is m+n
  * @param m: An integer
  * @param B: sorted integer array B which has n elemen...]]></description><category></category></item><item><title><![CDATA[Boolean Evaluation Java 走地牙 CTCI 8.14]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89507105</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89507105</guid><author>yangzhuhappy</author><pubDate>Thu, 25 Apr 2019 02:54:44 +0800</pubDate><description><![CDATA[Boolean Evaluation:Given a boolean expression consisting of the symbols 0 (false), 1 (true), &amp; (AND), I (OR), and /\ (XOR), and a desired boolean result value result, implement a function to coun...]]></description><category></category></item><item><title><![CDATA[Eight Queens Java 走地牙 CTCI 8.12]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89441906</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89441906</guid><author>yangzhuhappy</author><pubDate>Sun, 21 Apr 2019 23:09:57 +0800</pubDate><description><![CDATA[package com.company;
import java.util.*;
/*
* Eight Queens:Write an algorithm to print all ways of arranging eight queens on an 8x8 chess board
* so that none of them share the same row, column, or d...]]></description><category></category></item><item><title><![CDATA[Coins Java 走地牙 CTCI 8.11]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89424074</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89424074</guid><author>yangzhuhappy</author><pubDate>Sat, 20 Apr 2019 21:35:59 +0800</pubDate><description><![CDATA[package com.company;

/*
* Coins: Given an infinite number of quarters (25 cents), dimes (1O cents),
* nickels (5 cents), and pennies (1 cent), write code to calculate the number of ways of represent...]]></description><category></category></item><item><title><![CDATA[Paint Fill java 走地牙 CTCI 8.10]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89369691</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89369691</guid><author>yangzhuhappy</author><pubDate>Thu, 18 Apr 2019 04:05:21 +0800</pubDate><description><![CDATA[package com.company;
/*
* Paint Fill: Implement the "paint fill" function that one might see on many image editing programs.
* That is, given a screen (represented by a two-dimensional array of color...]]></description><category></category></item><item><title><![CDATA[Parens/Generate Parentheses java 走地牙 CTCI 8.9]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89347838</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89347838</guid><author>yangzhuhappy</author><pubDate>Wed, 17 Apr 2019 03:17:04 +0800</pubDate><description><![CDATA[Parens:Implement an algorithm to print all valid (i.e., properly opened and closed) combinations of n pairs of parentheses.



public class Solution {
  /**
  * @param n: n pairs
  * @return...]]></description><category></category></item><item><title><![CDATA[Permutations with Duplicates java 走地牙 CTCI 8.8]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89325516</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89325516</guid><author>yangzhuhappy</author><pubDate>Tue, 16 Apr 2019 07:41:15 +0800</pubDate><description><![CDATA[package com.company;
import java.util.*;
/*
 * Permutations with Duplicates: Write a method to compute all permutations
 * of a string whose characters are not necessarily unique. The list of permuta...]]></description><category></category></item><item><title><![CDATA[Permutations without Dups java 走地牙CTCI 8.7]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89304595</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89304595</guid><author>yangzhuhappy</author><pubDate>Mon, 15 Apr 2019 00:11:53 +0800</pubDate><description><![CDATA[import java.util.*;
/*
* Permutations without Dups: Write a method to compute all permutations of a string of unique characters.
* */

public class Main {

    public static void main(String[] args) ...]]></description><category></category></item><item><title><![CDATA[Towers of Hanoi 递归和构建 java 走地牙 CTCI 8.6]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89292143</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89292143</guid><author>yangzhuhappy</author><pubDate>Sun, 14 Apr 2019 03:48:06 +0800</pubDate><description><![CDATA[Towers of Hanoi:In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order ...]]></description><category></category></item><item><title><![CDATA[Recursive Multiply java 走地牙 CTCI 8.5]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89268263</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89268263</guid><author>yangzhuhappy</author><pubDate>Sat, 13 Apr 2019 02:09:04 +0800</pubDate><description><![CDATA[/*
* Recursive Multiply: Write a recursive function to multiply two positive integers without using the * operator
* (or / operator). You can use addition, subtraction, and bit shifting, but you shou...]]></description><category></category></item><item><title><![CDATA[Power Set/subset1/subset2/ java走地牙 CTCI 8.4]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89224289</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89224289</guid><author>yangzhuhappy</author><pubDate>Fri, 12 Apr 2019 04:46:57 +0800</pubDate><description><![CDATA[Power Set:Write a method to return all subsets of a set.

subset 1;没有重复数字；

public class Solution {
  /**
  * @param nums: A set of numbers
  * @return: A list of lists
  */
  public Lis...]]></description><category></category></item><item><title><![CDATA[Magic Index java 走地牙 CTCI 8.3]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89169367</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89169367</guid><author>yangzhuhappy</author><pubDate>Wed, 10 Apr 2019 03:19:57 +0800</pubDate><description><![CDATA[/*
* Magic Index: A magic index in an array A[ 1.•.n-1] is defined to be an index such that A[ i]
i. Given a sorted array of distinct integers, write a method to find a magic index, if one exists, in...]]></description><category></category></item><item><title><![CDATA[Robot in a Grid: java 走地牙 CTCI 8.2]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89164303</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89164303</guid><author>yangzhuhappy</author><pubDate>Tue, 09 Apr 2019 22:21:09 +0800</pubDate><description><![CDATA[Robot in a Grid:Imagine a robot sitting on the upper left corner of grid with r rows and c columns.The robot can only move in two directions, right and down, but certain cells are "off limits" such t...]]></description><category></category></item><item><title><![CDATA[Triple Step java 走地牙 8.1 CTCI]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/89133816</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/89133816</guid><author>yangzhuhappy</author><pubDate>Tue, 09 Apr 2019 09:20:15 +0800</pubDate><description><![CDATA[Triple Step:A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways the child can run up the stairs...]]></description><category></category></item><item><title><![CDATA[The Egg Drop Problem java走地牙CTCI 6.8]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88959549</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88959549</guid><author>yangzhuhappy</author><pubDate>Mon, 01 Apr 2019 22:53:41 +0800</pubDate><description><![CDATA[public class Main {

    public static void main(String[] args) {
        System.out.println("Hello World!");
        System.out.println(findBreakPoint());
    }

    public static int findBreakPoint...]]></description><category></category></item><item><title><![CDATA[Conversion java 走地牙CTCI 5.6]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88905448</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88905448</guid><author>yangzhuhappy</author><pubDate>Sat, 30 Mar 2019 03:11:00 +0800</pubDate><description><![CDATA[/*
5.6 Conversion: Write a function to determine the number of bits you would need to flip to convert
integer A to integer B.
EXAMPLE
Input: 29 (or: 11101), 15 (or: 01111) Output: 2
*/
public class M...]]></description><category></category></item><item><title><![CDATA[Next Number java 走地牙CTCI 5.4]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88882772</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88882772</guid><author>yangzhuhappy</author><pubDate>Fri, 29 Mar 2019 04:52:55 +0800</pubDate><description><![CDATA[/*
Next Number: Given a positive integer, print the next smallest and the last largest
number that have the same number of 1 bits in their binary representation.
方法是：1：最小下一个：11011001111100 相同数量的1的情况下...]]></description><category></category></item><item><title><![CDATA[Binary to String java 走地牙 CTCI 5.2]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88811235</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88811235</guid><author>yangzhuhappy</author><pubDate>Tue, 26 Mar 2019 03:39:37 +0800</pubDate><description><![CDATA[/*
Binary to String: Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double,
print the binary representation. If the number cannot be represented accurately in binary with at ...]]></description><category></category></item><item><title><![CDATA[Insertion java 走地牙 CTCI 5.1]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88811067</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88811067</guid><author>yangzhuhappy</author><pubDate>Tue, 26 Mar 2019 03:06:13 +0800</pubDate><description><![CDATA[/*
Insertion: You are given two 32-bit numbers, N and M, and two bit positions, i and j.
 Write a method to insert Minto N such that M starts at bit j and ends at bit i.
 You can assume that the bits...]]></description><category></category></item><item><title><![CDATA[Random Node java 走地牙 CTCI 4.11]]></title><link>https://blog.csdn.net/yangzhuhappy/article/details/88785424</link><guid>https://blog.csdn.net/yangzhuhappy/article/details/88785424</guid><author>yangzhuhappy</author><pubDate>Mon, 25 Mar 2019 08:01:45 +0800</pubDate><description><![CDATA[import java.util.*;

public class TreeNode {
    private int val;
    public TreeNode left, right;
    private int size = 0;

    public TreeNode(int val) {
        this.val = val;
        size = 1;
...]]></description><category></category></item></channel></rss>