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:


  • 相关阅读:
    module5-01-jQuery 基础
    module4-JavaScript 高级特性、ES6 新特性
    module4-05-ES6新特性
    module4-04-正则表达式
    module4-03-继承和函数进阶
    module4-02-面向对象编程案例 随机方块、贪吃蛇
    module4-01-面向对象编程、原型链、构造函数、原型对象
    module3-Web APIs 网页应用编程
    module3-05-定时器的应用-简单动画-无缝滚动-轮播图
    人生赢家从规划开始,先觉知、量己力、衡外情、重实践、善反省
  • 原文地址:https://www.cnblogs.com/juliachenOnSoftware/p/5297949.html
Copyright © 2011-2022 走看看