This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table stock{ | |
item_id varchar(10) | |
item_name varchar(25) | |
gst_slab int | |
quantity mediumtexttext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Space complexity - O(1) in-place | |
Time Complexity - O(N) | |
*/ | |
class Solution { | |
public: | |
void rotate(vector<int>& nums, int k) { | |
k = k - (k/nums.size())*nums.size(); | |
reverse(nums, 0,nums.size()-k-1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Initial list: 1->2->3->4->5->6->null | |
Append 3 nodes | |
4->5->6->1->2->3->null | |
*/ | |
void appendKNodes(Node* &head, int k) | |
{ | |
Node* temp = head; | |
for(int i=0; i<length(head)-k-1; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
void solve() | |
{ | |
} | |
int main() | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.