Personal Statement for Chinese University Having studied Chinese Language , I have built a strong knowledge base around it. As demonstrated in my most recent assignments and Exam, I’ve gained an active interest in understanding words and meaning on a new level. As a hardworking student with an ability produce work to a high standard, I think I would be able to put my skills to good use in this course. As I have a proficiency in language and a keep interest in learning more, this course would be a perfect . The world of computers is growing day by day, computers are the most influential tools in our life, they are our present and future. In my opinion nothing on the planet can measure the exponential growth and excitement in the IT industry, I want to be a part of, particularly computer science engineering From an early age I’ve always been deeply interested in comp...
Posts
- Get link
- X
- Other Apps
Finding the maximum depth of a binary tree The maximum depth of a binary tree is the number of nodes from the root down to the furthest leaf node. In other words, it is the height of a binary tree. Consider the binary tree illustrated below: The maximum depth, or height, of this tree is 44; node 77 and node 88 are both four nodes away from the root. Algorithm The algorithm uses recursion to calculate the maximum height: Recursively calculate the height of the tree to the left of the root. Recursively calculate the height of the tree to the right of the root. Pick the larger height from the two answers and add one to it (to account for the root node).
- Get link
- X
- Other Apps
Binary Tree Preorder Traversal G iven the root of a binary tree, return the inorder traversal of its nodes' values . Example 1: Input: root = [1,null,2,3] Output: [1,3,2] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] Constraints: The number of nodes in the tree is in the range [0, 100] . -100 <= Node.val <= 100 Solution With C++ class Solution { public: vector<int>d; vector<int> inorderTraversal(TreeNode* root) { if(root==NULL) return d; d=inorderTraversal(root->left); d.push_back(root->val); d=inorderTraversal(root->right); return d; } };
- Get link
- X
- Other Apps
A. George and Accommodation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a dormitory. George and Alex want to live in the same room. The dormitory has n rooms in total. At the moment the i -th room has p i people living in it and the room can accommodate q i people in total ( p i ≤ q i ). Your task is to count how many rooms has free place for both George and Alex. Input The first line contains a single integer n (1 ≤ n ≤...
- Get link
- X
- Other Apps
B. Colourblindness time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a grid with 2 2 rows and n n columns. He colours each cell red, green, or blue. Vasya is colourblind and can't distinguish green from blue. Determine if Vasya will consider the two rows of the grid to be coloured the same. Input The input consists of multiple test cases. The first line contains an integer t t ( 1 ≤ t ≤ 100 1 ≤ t ≤ 100 ) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n n ( 1 ≤ n ≤ 100 1 ≤ n ≤ 100 ) — the number of ...