Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AbhiiAB/30cbfb806d927b9fb29722870b1fb4e9 to your computer and use it in GitHub Desktop.
Save AbhiiAB/30cbfb806d927b9fb29722870b1fb4e9 to your computer and use it in GitHub Desktop.
Mid Course Summative Assessment - Data Structures (ST)

Summative Assessment Submission Instructions

  1. Login/Sign Up to your GitHub account.
  2. Fork this Gist from the Top-Right corner.
  3. Edit your Gist and paste/write the code solutions inside the respective functions.
  4. Do NOT change anything in the structure of the existing code/functions/class given in the GitHub Gist.
  5. Share your Gist link in the submission form as per the instructions given.
var invertTree = function (root) {
// Write your solution below
};
// Do NOT change anything below this line
class Node {
constructor(val) {
this.val = val;
this.left = this.right = null;
}
}
module.exports = { invertTree, Node };
var deckRevealedIncreasing = function (deck) {
// Write your solution below
};
// Do NOT change anything below this line
module.exports = { deckRevealedIncreasing };
function baseballScore(operations) {
// Write your solution below
}
// Do NOT change anything below this line
module.exports = { baseballScore };
function isPalindromeList(head) {
// Write your solution below
}
// Do NOT change anything below this line
class ListNode {
constructor(val, next = null) {
this.val = val;
this.next = next;
}
}
module.exports = { isPalindromeList, ListNode };
class LinkedList {
constructor() {
}
add(data) {
}
remove(data) {
}
getSize() {
}
printList() {
}
}
// Do NOT change anything below this line
class Node {
constructor(data) {
this.data = data;
this.next = null;
}
}
module.exports = { LinkedList };
class Stack {
constructor() {
}
push(item) {
}
pop() {
}
peek() {
}
isEmpty() {
}
}
// Do NOT change anything below this line
class Node {
constructor(item) {
this.item = item;
this.next = null;
}
}
module.exports = { Stack };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment