brightlightkim

  • 홈
  • 태그
  • 방명록

LinkedList 3

[LinkedList] CCI 2.2-2.3

2.2 Implement an algorithm to find the kth to last element of a singly linked list. public Node returnKthToLast(Node node, int k){ Node n = node; int i = 0; while (n.next != null){ if (i == k-1){ break; } i++; n = n.next; } return n; } This was so simple, but I found out that this algorithm is not what the potential interviewer is looking for. It's more like.. int printKthToLast(Node head, int k..

Algorithms and Data Structures/Data Structures 2022.05.21

[LinkedList] CCI 2.1

2.1 Write code to remove duplicates from an unsorted linked list. The first algorithm that came to my mind was storing data to Set and see if it shows an error when inserting a value to see if it exists. If it already exists then remove the node. Just checked the last Index. public Node deleteDuplicatedNodes(Node head){ Node n = head; Set set = new HashSet(); set.add(n.data); while(n.next != nul..

Algorithms and Data Structures/Coding Practices 2022.05.20

[Data Structures] Linked List

A Linked list is a data structure that represents a sequence of nodes. In a singly linked list, each node points to the next node in the linked list. A doubly linked list gives each node pointers to both the next node and the previous one. Unlike an array, a linked list does not provide constant-time access to a particular "index' within the list. This means that if you'd like to find the K'th e..

Algorithms and Data Structures/Data Structures 2022.05.20
1
더보기
프로필사진

Algorithms and Data Structures Research Blog https://www.linkedin.com/in/taeyang-kim/ https://github.com/brightlightkim

  • 분류 전체보기
    • Algorithms and Data Structu..
      • Algorithms
      • Data Structures
      • Coding Practices
    • AI
    • AWS
      • EC2
      • ECS
      • CDK
      • X-Ray
      • Cloud Practitioner Certific..
      • Global Infrastructure and R..
      • Networking
      • Storage and Databases
      • Security
      • Monitoring and Analytics
      • Pricing and Support
      • Migration and Innovation
    • Rust
    • Node.js
      • Jest
      • Joi
      • Express
    • Serverless
    • Docker
    • Mongo
    • React
      • Next.js
    • Vue.js
      • Vuex
      • Nuxt
    • Coding Languages
      • JavaScript
      • TypeScript
      • Python
    • Internet of Things (IoT)
      • Arduino
      • Circuits
    • Basic Coding Info
      • Git
      • Monorepo
    • Testing
    • Bug
      • Git
      • AWS
      • JavaScript
      • Node
    • BYU-Broadcast
      • ScreenSharing
      • Bi-Weekly Training
      • Sprint
    • Security
    • Flutter
    • Android_App
      • Front-end
      • Back-end
      • RxJava
    • Web
      • CSS

Tag

JEST, S3, ECS, EC2, Node.js, Git, Amazon, node, cdk, serverless, AWS, vuex, lambda, AI, ML, javascript, vue.js, BST, Docker, VUE,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바