zoukankan      html  css  js  c++  java
  • Pramp mock interview (4th practice): Matrix Spiral Print

    March 16, 2016

    Problem statement:
    Given a 2D array (matrix) named M, print all items of M in a spiral order, clockwise.
    For example:

    M  =  1   2   3   4   5
           6   7   8   9  10
          11  12  13  14  15
          16  17  18  19  20


    The clockwise spiral print is:  1 2 3 4 5 10 15 20 19 18 17 16 11 6 7 8 9 14 13 12

    Julia worked on solution using brute force solution. 

    https://gist.github.com/jianminchen/aa7a35df305b05f5d90a

    Evaluation from the mock interviewer:


  • 相关阅读:
    #leetcode687.最长同值路径
    #leetcode404.所有左叶子节点之和
    #leetcode111.二叉树的最小深度
    #leetcode101.对称二叉树
    #leetcode437.路径总和II
    #leetcode112.路径总和
    #leetcode543.二叉树的直径
    #leetcode110.平衡二叉树
    springboot数据库密码加密-使用自定义加密算法
    PHP加密
  • 原文地址:https://www.cnblogs.com/juliachenOnSoftware/p/5297949.html
Copyright © 2011-2022 走看看