首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Html5知典

    rotate()

    用途 rotate 规定 2D 旋转,在参数中规定角度。 语法 rotate(angle) 值 值 描述 <angle> <angle>代表旋转的角度。 例子 .stage{ width:50px; height:50px; background:red; transform:rotate(30deg);//顺时针旋转

    58710发布于 2019-11-26
  • 来自专栏calmound

    Rotate Image

    问题:矩阵顺时针旋转90度 class Solution { public: bool dfs(vector<vector<int> > &matrix,int target,int n) { if(n==matrix.size()) return false; if(matrix[n][0]>target) return false; for(int i=0;i<matrix[n].size();i++) {

    1.2K70发布于 2018-04-17
  • 来自专栏给永远比拿愉快

    Leetcode: Rotate Image

    Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? C++参考代码: class Solution { public: void rotate(vector<vector<int> > &matrix) { if (matrix.empty

    80020发布于 2019-01-22
  • 来自专栏给永远比拿愉快

    Leetcode: Rotate Array

    题目: Rotate an array of n elements to the right by k steps. 下面使用C#语言给出示例: 方法一: public void Rotate(int[] nums, int k) { int temp; int length = nums.Length { temp = nums[i]; nums[i] = nums[j]; nums[j] = temp; } } public void Rotate

    77020发布于 2019-01-25
  • 来自专栏后端技术

    Rotate List

    思路 先统计链表的长度n,如果k>n,就取k=k%n,如果k==0,就不用做变化,否则找到新链表头head2和它的前驱节点pre,将链表重新断开并连接,返回新链表头即可。 代码

    58230发布于 2019-05-25
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 48 Rotate Image

    Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? class Solution { public: void rotate(vector<vector<int>>& matrix) { int n=matrix.size();

    78160发布于 2018-01-12
  • 来自专栏米扑专栏

    【leetcode】Rotate List

    Question: Given a list, rotate the list to the right by k places, where k is non-negative.

    55830发布于 2019-02-19
  • 来自专栏Reck Zhang

    LeetCode 0048 - Rotate Image

    Rotate Image Desicription You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which means you have to modify the input 2D matrix directly Example 1: Given input matrix = [ [1,2,3], [4,5,6], [7,8,9] ], rotate the input matrix in-place 5], [14, 3, 4, 1], [12, 6, 8, 9], [16, 7,10,11] ] Solution class Solution { public: void rotate

    56520发布于 2021-08-11
  • 来自专栏蛮三刀的后端开发专栏

    Rotate List旋转链表

    参考:http://www.cnblogs.com/zuoyuan/p/3785465.html 解题思路:循环右移一条链表,比如k=2,(1,2,3,4,5)循环右移两位变为(4,5,1,2,3)。由于k值有可能比链表长度大很多,所以先要用一个count变量求出链表的长度。而k%count就是循环右移的步数。

    60620发布于 2019-03-26
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 61 Rotate List

    Given a list, rotate the list to the right by k places, where k is non-negative.

    744100发布于 2018-01-12
  • 来自专栏流川疯编写程序的艺术

    leetcode 189 Rotate Array

    Rotate an array of n elements to the right by k steps. array[left]= array[right]; array[right] = temp; left++; right--; } } void rotate list of integer # @param k, num of steps # @return nothing, please modify the nums list in-place. def rotate

    63520发布于 2019-01-18
  • 来自专栏全栈程序员必看

    animation rotate_canvas scale

    layout_above="@id/translate" android:text="测试alpha效果" /> <Button android:id="@+id/<em>rotate</em> android:layout_height="wrap_content" android:layout_above="@id/alpha" android:text="测试<em>rotate</em> layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@id/<em>rotate</em> android.widget.TextView; public class MainActivity extends Activity { private Button translate, alpha, <em>rotate</em> = (Button) findViewById(R.id.<em>rotate</em>); scale = (Button) findViewById(R.id.scale); text = (TextView) findViewById

    81020编辑于 2022-11-04
  • 来自专栏全栈程序员必看

    LeetCode Rotate Array「建议收藏」

    Rotate Array Total Accepted: 12759 Total Submissions: 73112 My Submissions Question Solution Rotate 解法一: class Solution { public: void rotate(int nums[], int n, int k) { if(n==0)return; class Solution { public: void rotate(int nums[], int n, int k) { if(n==0)return ;

    34210编辑于 2022-07-10
  • 来自专栏算法修养

    Rotate List

    题目 c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* rotateRight(ListNode* head, int k) { if(he

    59930发布于 2019-09-16
  • 来自专栏算法修养

    Rotate Array

    知道找到一开始的数字,形成一个闭环了,然后x++,直到交换次数==nums.size class Solution { public: void rotate(vector<int>& nums

    46440发布于 2020-02-12
  • 来自专栏小二的折腾日记

    Leetcode-48-Rotate-Image

    Leetcode-48-Rotate-Image ou are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which means you have to modify the input 2D matrix directly Example : Given input matrix = [ [1,2,3], [4,5,6], [7,8,9] ], rotate the input matrix in-place 代码如下: class Solution { public: void rotate(vector<vector<int>>& matrix) { if(matrix.size(

    64020发布于 2018-09-30
  • 来自专栏Reck Zhang

    LeetCode 0396 - Rotate Function

    Rotate Function Desicription Given an array of integers A and let n to be its length.

    24320发布于 2021-08-11
  • 来自专栏Html5知典

    rotate3d()

    用途 rotate3d 规定3D 旋转。 语法 rotate3d(x,y,z,angle) 值 值 描述 x 规定围绕X轴旋转的矢量值。 y 规定围绕Y轴旋转的矢量值。

    47620发布于 2019-11-26
  • 来自专栏Reck Zhang

    LeetCode 0189 - Rotate Array

    Rotate Array Desicription Given an array, rotate the array to the right by k steps, where k is non-negative Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 steps to the right: [7,1,2,3,4,5,6] rotate 2 steps to the right: [6,7,1,2,3,4,5] rotate 3 steps to the right: [5,6,7,1,2,3,4 ] Example 2: Input: [-1,-100,3,99] and k = 2 Output: [3,99,-1,-100] Explanation: rotate 1 steps to the right: [99,-1,-100,3] rotate 2 steps to the right: [3,99,-1,-100] Note: Try to come up as many solutions

    32720发布于 2021-08-11
  • 来自专栏蛮三刀的后端开发专栏

    Rotate Image旋转图像

    题目大意 顺时针翻转数组(以图像存储为例) 解题思路 先镜像反转,再每行前后翻转 代码 class Solution(object): def rotate(self, matrix):

    1.3K10发布于 2019-03-26
领券